JSFiddle - React, Tailwind, and code Playground
by nabtron
JavaScript
first = "this is first";
function one() {
first = "this is old first";
console.log(first);
var first = "this is outside first";
console.log(first);
var i = 1;
while(i<5){
let first = "this is new first";
console.log(first);
i++;
}
console.log(first);
}
function two() {
second = "this is second";
}
function three() {
var third = 'this is third';
}
one();
two();
three();
console.log(first);
console.log(second);
//console.log(third);