How Javascript is working-Mechanisms
Contents Create a JavaScript variable Create a JavaScript function Assign JavaScript function as a variable Create a JSON Object Understand about the scope and get the idea about the “this” keyword The difference between bind and call How to create a JavaScript class and way of using the prototype What is closure and behavior of closure Create a JavaScript variable There are no variable types like int, String in JavaScript. The way that creating JavaScript variables is given below. There are three keywords used when declaring a variable in Javascript, namely, var , let and const . var age=15; let age=15; cons age=15; var Method This was the only way to declare a variable before ES6. Here you can declare the same variables more than one time and can be updated. var myFriend = 'Kevin' ; var myFriend = 'Dayana' ; console . log ( myFriend ); // 'Dayana' If you declare variable inside ...
Comments
Post a Comment