Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Array.find is unusable in Javascript


The Programmaticon V gives, among other things, access to methods attached to Array.prototype. However, even though Array.find is listed in these arrays, trying to use it will throw an error. The error claims “array has no method find” - where ‘array’ is your given array - even though it should have the method find, because Array.prototype does. I would like to note here that other Array.prototype methods, like filter, will work.

As an example, this code will throw an error:

var largeNumber = [0, 10, 15, 9001].find(function(element) {
    return element > 9000;

while this code will not:

var largeNumbers = [0, 10, 15, 9001].filter(function(element) {
    return element > 9000;

This seems to imply that the problem is one of permissions - the Programmaticon V does not actually grant the user Array.find, even though it should. I have no way to check this, but it seems to me to be the most likely theory.


The programmacticon V doesn’t give you access to Array.find, It only gives you a way to look at the APIs, which are kind of like how dictionaries don’t give you the power to spell words correctly, they only give you a way to find how to spell them.


As it turns out, you are correct - unlike weapons, boots, and the like, it seems that the Programmaticon does not grant methods, and any constructions native to JavaScript itself will be usable from the outset. In any case, however, Array.find does throw an error, and my observation above remains true.