HEADER ADS 728X90

JavaScript Global & Local Variable Uses | Javascript Tutorial | BY CodePrime

javascript,codeprime,javascript tutorial by codeprime,codeprime js,JavaScript Global & Local Variable tutorial,javascript tutorial for beginners,web design tutorial,javascript global variable,javascript local variable,difference between global and local variable,javascript tutorial in hindi,learn javascript in hindi,javascript for beginners,javascript basics,javascript with html,yahoo baba javascript,variable scope in javascript,javascript variable scope,global,js,codeprime, coding tutorial, how to learn coding easy way to learn coding

Hi dear welcome to "CodePrime" Blog . In this post you are going to learnJavaScript Global & Local Variable Tutorial. First Creat A index.html file Copy This HTML CODE and pest it one your code editor. 2ndly creat global-and-local-variable.js file Then Copy The JS CODE and pest it then open the index.html file with your browser.

HTML CODE

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="global-and-local-variable.js"></script>
    <title>javascript</title>
</head>
<body>
    <!-- <h2>Javascript Tutorial</h2>
    <h3>By Codeprime</h3> -->

   
</body>
</html>

JAVASCRIPT CODE

var a = "Codeprime";//global varaible
function helo(){
    var a = "Codeprime"; //local varaible
    document.write(a + "<br>");

}
helo();
document.write(a);

Youtube Tutorial

FLOW US ON SOCIAL MEDIA

Post a Comment

0 Comments

Join Telegram