JSFiddle - React, Tailwind, and code Playground
by Chuan Shao
JavaScript
//Evaluate to undefined
var a;
console.log(a);
function Sample(x){
this.x = x;
}
var s = new Sample();
console.log(s.x)
console.log(s.notExistVariable);
var n = [2,3,4];
console.log(n[8]);
function test(){
//no return value for this function
}
console.log(test());
function test2(){
return;
}
console.log(test2());
console.log(null == undefined);
console.log(null === undefined);