JXA: Reading/Using Data from the Clipboard

I figured out why we are seeing different results:

  • You are using var clip = sa.theClipboard,
  • I am using: var clip = sa.theClipboard(),

So, you are setting the variable clip to the FUNCTION theClipboard,
whereas I am setting it to the VALUE of theClipboard

Using your script, but:
// ##CHG: Added () to theClipboard
// ##CHG: Removed () from "clip()"