Variable in JavaScript
JavaScript data type
One of the most distinctive features of a program language is the set of data types it supports. This is the type of value that can be represented and manipulated in the program language.
JavaScript lets you work with the following three types of original data:
- Numbers, for example : 123, 120.50, .
- Text string , for example: "This text string", .
- Boolean for example: true or false.
JavaScript also defines two common data types, null and undefined , each of which only defines a single value. In addition to these data types, JavaScript supports a mixed data type called object . We will discuss the details of objects in a separate chapter.
Note - Java does not distinguish integer values and floating-point values. All numbers in JavaScript are represented as floating point values. JavaScript represents numbers using the 64 bit floating-point format defined by the IEEE 754 standard.
Variables in JavaScript
Like many other program languages, JavaScript has variables. Variables can be considered a named container. You can put data into this container and then refer to this data simply by naming the container.
Before you use a variable in a JavaScript program, you must declare it. Variables are declared with the keyword var as follows:
You should read it
- Variable scope in C ++
- Array (Array) in JavaScript
- Learn about ES6 in Javascript
- Scope rules in programming C
- Declare variables in SQL Server
- How to Code an Alert with a Variable Using Javascript
- Syntax of JavaScript
- What is JavaScript? Can the Internet exist without JavaScript?
- Learn about custom variables in Google Analytics
- What is Currying in Javascript? How to use Currying in JavaScript
- Things to know about 'this' in JavaScript
- ! = and! == What is the difference in JavaScript?
Maybe you are interested
How to add Python to the Windows PATH variable
How to add an environment variable in Windows 10
FVSCHEDULE function - Returns the future value of an investment that has variable or adjustable interest in period in Excel
How to Code an Alert with a Variable Using Javascript
How to Use Excel VBA Variable Data Types
How to set and list environment variables in Linux