Object typification in JavaScript
Objects have their own data type
called 'object'. Check it with
the operator typeof:
javascriptconsole.log(typeof {}); // shows 'object'
Задание 1
Without running the code, determine what will be output to the console:
javascriptconsole.log( typeof {x: 1, y: 2, z: 3} );
Задание 2
Without running the code, determine what will be output to the console:
javascriptconsole.log( typeof {} );
Задание 3
Without running the code, determine what will be output to the console:
javascriptlet obj = {x: 1, y: 2, z: 3};
console.log( typeof obj );
Задание 4
Without running the code, determine what will be output to the console:
javascriptlet obj = {x: 1, y: 2, z: 3};
console.log( typeof obj['x'] );