Data Types - Part 1

Notes:

JavaScript Data types - Part 1 - typeof operator

Data type: The name itself indicating, data type means type of data.
JavaScript typeof operator: is a special operator, used to display the type of data.

Syntax:
typeof data;
data : can be a data value, variable name or constant name

var playerScore= 10; // playerScore variable is holding Number type of data
var playerName=”Johny”; // playerName variable is holding String type of data
var isGameOver=true; // isGameOver variable is holding Boolean type of data
var speed=undefined; // speed is holding Undefined type of data

var rollNumbers = [10,20,30]; // rollNumbers variable is holding Object type of data
var point = {x:10,y:10}; // point variable is holding Object type of data
var point=null; // point variable is not pointing any object

Interview Questions: