Skip to content

How to concatenate strings in AppleScript

The Valley of Code

Your Web Development Manual

I’m used to using the + operator to concatenate strings in JavaScript, Swift, Python and other languages.

So I tried that in AppleScript but it didn’t work.

In AppleScript you use the & operator:

set example to "hello"
"testing " & example

☝️ is the macOS built-in Script Editor app, the best way I found to tinker with AppleScript.

  • THE VALLEY OF CODE (+ PRO), your web development manual
  • I wrote 15+ free coding BOOKS, download them here
  • SOLOPRENEUR LAND the missing MBA for wannabe solopreneurs craving a life with more freedom, control, fulfillment and purpose (summer 2024)