Say I have a function.
function foo(){
//do stuff
}
And then I create an object of that function.
var fooObj = new foo();
What is fooObj
called? An instance, An object instance, or something else entirely? Pardon the newbie question, but I am rather new to prototype based programming(and all programming really).
fooObj
is an object and it is also an instance of the foo
prototype.
Though javascript doesn’t technically have classes, many would also call fooObj
an object of the foo
class because it works somewhat similarly to classes in other languages.
3