Fun AppleScript Tricks (or not)
Take a look at the following Applescript. What do you expect to happen in both cases?
Snippet #1
set ab to {"a", "b"}
set alpha to {"a", "b", "c", "d"}
if ab is in alpha then
log ("ab in alpha")
else
log ("ab not in alpha")
end if
Snippet #2
set ab to {"a", "c"}
set alpha to {"a", "b", "c", "d"}
if ab is in alpha then
log ("ab in alpha")
else
log ("ab not in alpha")
end if
Click below for the answer to the riddle
(more…)