Hi, time for another newbie question.
Is there a document or webpage the defines array functions in Twine 2/Sugar Cube 2?
I've gotten examples of $array.push() and $array.pop() and $array.length that aren't listed on the SugarCube website
motoslave.net/sugarcube/2/#documentation. And now I'm looking for some more obscure array functions that I remember using from other programming languages. Example:
I need a function like $array.position("X") that would return the position index of the value "X" from an array.
Are these array functions from SugarCube or Twine? Are they javascript? HTML? or something else? And where can I find a document defining them?
Thanks.
Comments
Two websites commonly used to look up information about Javascript and HTML are:
1. Mozilla Developer Network, in your particular case the Array object.
2. w3schools, again in your particular case the Array object.
The <Array>.find() method, which returns the value itself, may also prove useful.
TheMadExile and greyelf, you guys are the best!
Thanks for helping me identify the coding languages and the functions I need to target in my searches.