Skip to content

How to concatenate strings in AppleScript

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.

I wrote 17 books to help you become a better developer, download them all at $0 cost by joining my newsletter

  • C Handbook
  • Command Line Handbook
  • CSS Handbook
  • Express Handbook
  • Git Cheat Sheet
  • Go Handbook
  • HTML Handbook
  • JS Handbook
  • Laravel Handbook
  • Next.js Handbook
  • Node.js Handbook
  • PHP Handbook
  • Python Handbook
  • React Handbook
  • SQL Handbook
  • Svelte Handbook
  • Swift Handbook

JOIN MY CODING BOOTCAMP, an amazing cohort course that will be a huge step up in your coding career - covering React, Next.js - next edition February 2025

Bootcamp 2025

Join the waiting list