How do you declare a variable in a script?

How do you declare a variable in a script?
Answer
Creating a variable in JavaScript is called “declaring” a variable. You declare a JavaScript variable with
the var keyword:var carName ; After the declaration, the variable has no value (technically it has the value of undefined ).
 

Tìm kiếm

Back
Top