Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
26 views

Javascript Tutorial

The document discusses the differences between variables declared using let, var, and const in JavaScript. It explains that var was commonly used before ES6 but can introduce bugs, so let should be used instead. Const is used to declare constants whose value cannot change. Let and const are block scoped while var can be updated and redeclared within its scope. The document provides examples of declaring and assigning values to variables using let, var, and const to illustrate their differences.

Uploaded by

ANGRY CAPTAIN
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Javascript Tutorial

The document discusses the differences between variables declared using let, var, and const in JavaScript. It explains that var was commonly used before ES6 but can introduce bugs, so let should be used instead. Const is used to declare constants whose value cannot change. Let and const are block scoped while var can be updated and redeclared within its scope. The document provides examples of declaring and assigning values to variables using let, var, and const to illustrate their differences.

Uploaded by

ANGRY CAPTAIN
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Introduction to JavaScript + Setup | JavaScript Tutorial in

#1

You will have to use a programming language likeNK]. SO. If you want to add this Then, you
will use the object literal syntax. The passage provides insights into the role of computers in
everyday life.. It explains that a computer is a "dumb" machine and that humans use it
because of its speed and accuracy.. IT also explains that a computer will not be able to do
something if you have not programmed it correctly, and that it is very loyal. THis Passage
provides insights into the history and development of [UNK] script, as well as why it is a
standard.. IT also provides an explanation for why [UNK] allows for a wide range of actions,
with the potential to avoid errors...
You will have to use a programming language likeNK]. SO. If you want to add this Then, you
will use the object literal syntax. The passage provides insights into the role of computers in
everyday life.. It explains that a computer is a "dumb" machine and that humans use it
because of its speed and accuracy.. IT also explains that a computer will not be able to do
something if you have not programmed it correctly, and that it is very loyal. THis Passage
provides insights into the history and development of [UNK] script, as well as why it is a
standard.. IT also provides an explanation for why [UNK] allows for a wide range of actions,
with the potential to avoid errors...
In this passage, the author is discussing how people can execute.NK] One way is to open a
new window and right-click, inspect, and then enter [UNK] hit enter to see [UNK] World ''
printed. Another way is to use a runtime like [UNK] which can run [UNK] inside a browser.
Finally,. Another way is to use Replit,, which is a powerful platform that enables people to run
[UNK] simultaneously on their phone and laptop. console.log ( [UNK] Hello World [UNK] ) ;
Console.log ( C ); run this repl So you see here, the code is generated in the repl and it is
printing out the value of C,, which is 3 Okay! This Passage discusses the code that the
speaker has written. The Speaker has written. He explains that the code is okay, but they will
understand what would have happened if the code had not been written in the future.. He
also mentions that he just wants to show the audience by writing some code and then
familiarising them with repl.. The Speaker then explains that if they run the code, it will print
out 57. The Speaker then goes on to explain that function, console.log, and bracket were all
used in the code, and that he will explain why. In later videos.. The Speaker then concludes
the video by saying that he will give a [UNK] of the first chapter to those who watch the
video.

Variables in JavaScript | JavaScript Tutorial in #2


We 'll see what exactly a variable in JavaScript is and how to make it and we 'll also do some
sample programs. In JavaScript you can change a variable 's type in run time. Different data
types can be stored in variables such as string , number , array. JavaScript is known as
dynamically typed languages. Dynamic typing means that you 'll have to declare the variable
type if it 's an integer, floating point number , string or character. A variable is simply a
container in JavaScript. For example , I have this room as memory or RAM. If I write console.
log instead of console. It won't run. We have to follow some rules in JavaScript if we want to
execute anything. This repl contains code for the Ultimate JavaScript course. JavaScript
allows us to change a variable type in run time. If I write a = harry, the type is now string. As
its type is string , it holds harry. Some languages allow this, and some do n't. We use repl. It
runs on clouds. We 'll use let to make a variable in JavaScript , forget var. a contains , sorry ,
a contains 67. I 'll do console. log a and I get to see 67.
When I write var a = 7, the 7 is literal. There are some rules to name a variable. Letters, digits,
underscores and underscores are allowed. You ca n't start with a number. For example, if I
write let 8harry = 7 it 'll say no. Not allowed this will throw an error. JavaScript is case
sensitive. We 'll learn the difference between var , let , const. It 's confusing so I 'll take my
time explaining it. If you have n't accessed the JavaScript playlist yet, then access the
ultimate JavaScript playlist. Do follow me on repl. and do follow me here.

Const, Let and Var in JavaScript | JavaScript Tutorial in


#3
In this section, we will see differences between let , var & const & const. Before ES6, in
JavaScript To define any variable, Var keyword was used. But now the var keyword is not
used at all. Because due to some reasons Bug can be introduced in your code. So var is
found in pre ES6 And as a rule of thumb we should avoid it. Const is used to declare
constants. Constant 's are those identifiers Whose value can not be changed throughout the
JavaScript program. ES6 is ECMAscript 6 which means modern JavaScript. Many things are
added to it. And made JavaScript a beautiful language By using ES6. Var can be updated &
re-declared within its scope. But Let and Const are blocked scoped. I will tell you all these in
upcoming videos. Var can introduce bugs in your code. So we should always use let. And
use let only. I am not saying that the code that has var That code will blast Or there will be a
bomb blast in your computer if you used var code. But if you are writing new code, If you're
writing fresh code, Then use let and const.
When you declare you say that Make this variable in the memory. Then what will happen ?
Then it will say it is already in the. memory. Var does not throw an error. Sometimes errors
are good. Errors are not always bad. If you are doing anything And you are getting an error ,
Then sometimes that error is good. Maybe if you do n't get that error now , Then you wo n't
know why the error occurs. Then you are stopped there itself. Take the error , And fix the
code here itself. Then move forward. Const can neither be updated nor be created. Var
variables are initialised and undefined. Whereas let and const are not initialised.
Const must be initialised during declaration unlike let and var. So if I will write const harry
then I will need to write =0. Or = something else. And now I ca n't change it because it is a
constant. And if you know any variable value wo n't be changed. Then make it const. This
video for many people those Who are programming beginners will find it very intimidating.
They will think God knows what all is taught. How to make variables ? What is it ?
Sometimes it is written, sometimes null , sometimes null. Neither I know what is null , nor
what is undefined. I will explain in such a way that you wo n't forget even if you want to. So
with that access the course of JavaScript.

You might also like