What is arr; syntax arr; performing backstage?
This is an ExpressionStatement expression. The JavaScript engine tries to evaluate an expression by reading the value of a variable and then does nothing with it. If it is present inside the javascript function, it will not do anything (except when arr not a variable, this will cause an error). If you just write arr; in the developer console, most browsers will echo the values ββof the last expression entered, so as a result, you will see the arr value. The echo mechanism is often implemented similarly to console.log ;
I assume console.log( arr ); iterates over all properties of an arr object
console.log displays the value in the developer console. If the value is a string, the string is printed. If the value is an object, then it depends on the browser what is happening. Most browsers, such as Chrome, will display an interactive representation of the object, for example:

Another browser may simply call toString on an object that will actually iterate over the elements and join them separated by commas.
Also [] tell me that I am dealing with an object of an array of types, and {} tells me that I am dealing with an object of type object literal?
Yes and yes. [1, 2, 3] is an array literal that will evaluate a new instance of an array containing these values. [] is just an empty array. Arrays are instances of type Array . {a:1,b:2} is an object literal, each time it will be evaluated by a new instance. {} is an empty borderless object. Object literals evaluate to instances of type Object .
So, [ item: 'val' ] is an object with an array prototype, and { item: 'val' } is an object literal prototype object?
No and yes. [ item: 'val' ] is not valid syntax. Array literals have elements separated by commas; they cannot have a colon in them.
[ item: 'val' ] VM154:1 Uncaught SyntaxError: Unexpected token :(β¦)
: - this is an unexpected token, the expression cannot be evaluated, because it has syntax errors.
On the other hand, { item:'val' } is a fully regular object literal of type Object and will have one field named item with the value 'val' .
About object properties
In javascript, an object does not have a fixed set of properties. Properties can be dynamically added and deleted by writing them and using the delete keyword. Each object has field (or symbol) names. An array can be thought of as an object optimized for whole keys. But still, the keys are strings, so a[0] means the same as a["0"] .
var arr = [1, 2]; arr.item = 'val'; // assigns a new field to the object, called item arr['item'] = 'val'; // does exactly the same as the previous arr[1] = 3; // sets the second item in arr to 3 arr['1'] = 3; // does exactly the same as the previous console.log(arr); // prints [1, 2, item: "val"]
Thus, arbitrary named fields can be assigned in an array, and when printing Chrome notes that the object is an array, therefore it uses array notation, but also prints βotherβ assigned values. It is important to note that not every field is printed, since arr.length is a fully functional property. That's how the guys from Google decided to print arrays. This is not valid JavaScript syntax , it is just a (pretty good) visualization of the data inside the array.
About classes and prototypes
We say that foo has a class foo if foo has a prototype Foo.prototype , in other words foo.__proto__ === Foo.prototype . Here foo is an object, foo is a constructor function. Since foo itself is a function, Foo.__proto__ === Function.prototype .
If subtypes are involved, then we can say that bar is an instance of foo , if bar has Foo.prototype in the prototype chain, i.e.: bar.__proto__ === Foo.prototype || bar.__proto__.__proto__ === Foo.prototype || ... bar.__proto__ === Foo.prototype || bar.__proto__.__proto__ === Foo.prototype || ... bar.__proto__ === Foo.prototype || bar.__proto__.__proto__ === Foo.prototype || ... Explicit access to the .__proto__ object is considered bad practice and is very discouraged. Changing the __proto__ value results in serious performance __proto__ because it violates browser optimization strategies. So how to check if an object is a type? You can use instanceof operator.