Answers for "how to get variable value outside function in javascript"

3

how to get variable value outside function in javascript

/* Not putting "var", "let" or "const" will make the variable Public
And usable outside a functin */

function Play(){
  	Video = 12 // Seconds
	var Length = 15
}
console.log(Video) // Prints 12
console.log(Length) // "Lenght" is undefined
Posted by: Guest on July-18-2021

Code answers related to "how to get variable value outside function in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language