Copy link to clipboard
Copied
Good day honorable adobe forum members,
I am looking for the method to use to check if a value is in a list
i.e.:
var list = ["A","B","C"]
if ("a" in list) {
//dothings
}
Hoe does one do this effectively?
Thank you in advance for any and all trouble to be taken
Yes, using the indexOf method. See: https://www.w3schools.com/jsref/jsref_indexof_array.asp
Copy link to clipboard
Copied
I see I typed "a" instead of "A" , I hope this doesn't cause confusion (the example should say "A")
Copy link to clipboard
Copied
Yes, using the indexOf method. See: https://www.w3schools.com/jsref/jsref_indexof_array.asp
Copy link to clipboard
Copied
Thank you try67, your presence on these boards is a godsend.
Thank you very much once more.
Copy link to clipboard
Copied
You're very welcome!