Scripter Javascript Tutorial
javascriptmusiclogicscripterbookexcerpttutorial54 Get information about an object
To check if a property exists in an object, use the in
operator:
var hasKey = "name" in scale; // true
To get a list of all keys in an object, there are technically two
ways but the most straightforward way for Scripter is to use the
keys()
function for Object
:
var keys = Object.keys(scale);