+1 vote
by
Learn javascript but use it to distinguish a variable from object, etc
Recently for example I read that
console.log - console(variable) log(property)
Person.prototype.the greet - Person(class) prototype(library), etc

Please suggest how to distinguish it all
by
Don't know will help or not, but be clear about one thing: Object - the essence of a variable of type Class! That is, there are variables of type "string" ('abc', '1230bbb'...), "number" (255, 671, 0...)..., and then there are the variables of type "Class" ({e: 55, s: 'fulltext', log: function()...}). Only here in JS there are NO classes. There is a slightly different mechanism is used (just prototypes), but the essence is the same...
by
in javascript all links on objects: objects-primitives, objects-function objects-objects. To distinguish purpose and location.

2 Answers

0 votes
by
 
Best answer
Person is not a class but an object, and the prototype is not a library, and the method through which we apply to the object prototype. Correct if something is not said
0 votes
by
console.log - console(variable) log(property)


console is a variable that contains a reference to the object
console.log this property of the log object contained by reference in the variable console
console.log () is a function call contained in the property log object contained by reference in the variable console

Person.prototype.greet - greet is a property of the prototype object that is declared for the constructor Person.
...