Listing all objects that share a common variable in Javascript
- by ntgCleaner
I'm not exactly sure how to ask this because I am just learning OOP in Javascript, but here it goes:
I am trying to be able to make a call (eventually be able to sort) for all objects with the same variable. Here's an example below:
function animal(name, numLegs, option2, option3){
this.name = name;
this.numLegs = numLegs;
…