5 minute(s) read
Published on: May 21, 2021
Updated on: Dec 14, 2021
To store different amounts of data, you need to get help from it; to master this, we suggest you pay attention to the following example.
Let and const:
The case which we have mentioned at the beginning was the only way that has been used to store data values until 2015, but now other ways are being used instead, including let and const.
You must use this when you want to define a variable that cannot be changed again.
When the variable has a limited range, it is time to use this.
Much Like Algebra:
In this case, to try to store data values, you must use variables such as price1, for example.
When you plan to take action in this area, you need to follow the rules, some of which we will explain below.
- Identifiers are very important, and in fact, they can be in the form of short names or descriptive names.
- While using names for identifiers, you have to pay attention to the uppercase and lowercase letters that are used in them because even with a large and small change in one of the letters, it is considered as a different variable.
- About the names being used, it is important that they start with a letter.
- It is possible to use Dollar Sign $ for import, now note the example below in this regard.
Underscore (_) may also be used to enter various data, which is mentioned in the example below.
In addition to using these features and declaring a variable, it is possible to separate the various variables you enter by using commas now consider the following example.
In most cases, no value is defined for the variables when they are imported, as this data may be calculated later by the users, or it may be entered at another time by the program owner; now consider the following example.
It may be as follows:
As you can see in this article, there are different ways to store different amounts of data, and the available data may be in different forms, which we explained and gave examples in this regard. Still, the most important point is that you have to follow all the instructions while entering commands to execute properly. As a result, if you pay attention to the mentioned point as well as the examples which have been described, you can have more awareness in the field of data types and various variables as well as the way that they are being used in this article we have explained JS programming language which is so popular among various programmers and is being used by them, we hope you can get help from this article to write codes in the best possible way without being wrong.Click to analyze your wesbite SEO