JSFiddle - React, Tailwind, and code Playground

by Siva Subramaniam

JavaScript

function test() {
	// Function gets the highest prioroty and it will not be
  // overwritten by the variable declaration in line 13 below
	console.log(typeof callBeforeDeclare);
	
  // This function will be hoisted to the top of the function test
  function callBeforeDeclare() {
  	console.log('hello world!');
  }
  
  // This variable has the same name as function
  // But it will not override the function
  var callBeforeDeclare = 1;

}
test();