JSFiddle - React, Tailwind, and code Playground
JavaScript
/* Hoisting is JavaScript's default behavior of moving declarations to the top. */
var alert = function (str) {
var st = document.createTextNode(str);
var p = document.createElement('p');
p.appendChild(st);
document.querySelector('body').appendChild(p);
}
var x;
x = 5;
alert(x)
y = 10;
alert(y)
var y;