JSFiddle - React, Tailwind, and code Playground

by szivak009

JavaScript

var point = function() {
    this.x = 4;
    this.y = 6;
}

// var v0; Notice: I commented it out with purpose to make it undefined.   
var v1;
var v2 = null;
var v3 = false;
var v4 = 'some text';
var v5 = 68;
var v6 = {};
var v7 = new point();
var v8 = new Array();
var v9 = function() {};

typeof v0; // undefined
typeof v1; // undefined
typeof v2; // object
typeof v3; // boolean
typeof v4; // string
typeof v5; // number
typeof v6; // object
typeof v7; // object
typeof v8; // object
typeof v9; // function

//console.log((1000/0));
//console.log(typeof (1000/0));

//console.log(typeof v0); // undefined
//console.log(typeof v1); // undefined
//console.log(typeof v2); // object
//console.log(typeof v3); // boolean
//console.log(typeof v4); // string
//console.log(typeof v5); // number
//console.log(typeof v6); // object
//console.log(typeof v7); // object
//console.log(typeof v8); // object
//console.log(typeof v9); // function

var v10 = 1000 / 0; // Infinity
var v11 = 1000 / 'book'; // NaN

typeof v10; // number
typeof v11; // number