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 21 books to help you become a better developer:
- HTML Handbook
- Next.js Pages Router Handbook
- Alpine.js Handbook
- HTMX Handbook
- TypeScript Handbook
- React Handbook
- SQL Handbook
- Git Cheat Sheet
- Laravel Handbook
- Express Handbook
- Swift Handbook
- Go Handbook
- PHP Handbook
- Python Handbook
- Linux Commands Handbook
- C Handbook
- JavaScript Handbook
- Svelte Handbook
- CSS Handbook
- Node.js Handbook
- Vue Handbook