Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript Hoisting

x = 5; // Assign 5 to x

elem = document.getElementById("demo"); // Find an element
elem.innerHTML = x;                     // Display x in the element

var x; // Declare x
Source by fireship.io #
 
PREVIOUS NEXT
Tagged: #JavaScript #Hoisting
ADD COMMENT
Topic
Name
6+2 =