Variables in Javascript (Source code)

Hey guys how are you all today in this post I am going to give the source code of my second tutorial of javascript course. so let's begin this post:

Here's the video





index.html

<!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">
    <title>JS TUTORIAL - 2 (variables in javascript)</title>
</head>
<body>
    <script src="index.js"></script>
</body>
</html>

Index.js

// // const a = 15;
// var b =  15; // Create a container in the ram named b and assign 15 to it.
// // let c = 15;

// // a = a+1;
// // b= b+1;
// // c = c+1;
// // var greeter = "hey hi";
   
// // function newFunction() {
// //     var hello = "hello";
// //     console.log(hello) // -> successfully executed
// // }
// // newFunction()
//     // console.log(hello)// -> Error
// var j;
// console.log(j)
// /*
// What is a Variable
// The variables is a container whihc is created inside the ram by a program


// */
const a = 14;
console.log(a)
a = 15
console.log(a)

I hope that you liked this post.

Share it to your friends.

Thank You.

Comments

Popular posts from this blog

The Professional HTML Cheatsheet For beginners in 2024 for free

Arrays and conversion in Javascript || javascript complete course || #7 (sourcecode)

Top 3 Websites to get copyright free images in 2024 for free