Reputation: 41
I am debugging a function for a Photoshop script:
function artboardRename (artboard, param1, param2, param3) {
let vis = artboard.visible;
alert(vis);
}
// artboard is a layerSet
but I keep getting an error:
Error 25: Expected: ;. Line 202 -> let vis = artboard.visible;
Why do I keep getting this error?
Upvotes: 4
Views: 2031
Reputation: 961
There's no let
in photoshop scripting because Adobe ExtendScript is based currently on EcmaScript version 3. This also means there's no very basic features such as Array.indexOf(), nevermind the ES5 and 6 syntaxes.
The correct code that should work is:
function artboardRename (artboard, param1, param2, param3) {
var vis = artboard.visible;
alert(vis);
}
Upvotes: 6