I’ve just made another simple example of a set of properties that you can use on lists: $allkeys
and $allkeysSet
, alongside the other uncommonly known properties.
UPDATE: It turns out there’s a better alternative to $allKeys
and $allkeysSet
, which is to use public properties such as .getChildNames
, .getPropertyKeys
, and .getFunctionNames
instead so you get almost no chance of your code being non-functional by the “implementation changes”.
Please feel free to provide better usage examples of this particular property if you have one!
Oh! Apologies I found these “hidden” properties while playing with the console and randomly used that as a source to the example. I didn’t even know these properties exist on Perchance, so I might change these examples to reference to these properties. duh
I also found existing documentations on how these properties work, such as on the Perchance Snippets page and the Other Properties and Creating Perchance Lists article in the Advanced Generator Building Concepts section on the Hub. (I also randomly found that
getPropertyKeys
is used on what-blank-are-you-template while searching for that online.)But thanks for the explanation, though.