const array1 = [5, 12, 8, 130, 44];
const found = array1.find(element => element > 10);
console.log(found);
// expected output: 12
String Number.0.97.8.582..6985849
90.864.2.3.4.1..5785.9.6..77
class Person
{
constructor(name)
{
this.name = name;
}
}
Person.prototype.x = function(){return this.name};
p = new Person("dfrewiop");
console.log(p.x());
}
/*Prototype.prototype.x = this.name will not work*/
what is prototype-based in javascript