New course! Every coder should learn Generative AI!
Try a free lesson+ 7
Global variable JS
How can I make a variable declared inside a function global in JS?
2 Answers
+ 2
function myFunction() {
window.myvar =10;
}
+ 7
Thank you @Eranga!
How can I make a variable declared inside a function global in JS?