- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10711 Articles for Web Development
![Shubham Vora](https://www.tutorialspoint.com/assets/profiles/485898/profile/60_1456867-1657516792.jpeg)
8K+ Views
In this tutorial, we will learn to check if the variable is NaN in JavaScript. The full form of the NaN is ‘not a number’. The NaN is the reserved keyword in the JavaScript which we can assign to the variable. If users are using the below method to check whether a variable is a number or not, it will not work. var a = "Hello"; let result = a == NaN; // it always returns false. As we have talked that the above method will not work to check for a number because NaN is the reserved keyword. ... Read More
![Abhishek](https://www.tutorialspoint.com/assets/profiles/545227/profile/60_599940-1667195518.jpeg)
498 Views
In this tutorial, we will learn about NaN in JavaScript. NaN is nothing more than a property of the global object which stands for Not a Number. It is mainly used to check whether the entered value is a number or not. The NaN and Number. NaN both are same, so do not confuse next time if Number. NaN is written in any program as it is similar to NaN. The NaN is a property that is rarely used in any program because it is not a good practice to use NaN to identify anything in the program. There is ... Read More
![Abhishek Kumar](https://www.tutorialspoint.com/assets/profiles/522605/profile/60_2286409-1663737781.jpeg)
3K+ Views
We use the const keyword in JavaScript to declare variables whose value can be initialized only at the time of declaration. It is similar functionality of declaring variables as the other keywords provided in JavaScript i.e. var and let. const is short for constant, meaning that the value that resides in the variable is unchangeable. The const keyword in JavaScript It is used to declare variables in JavaScript. The variables created using const follow certain rules. The variable is block scoped. This means that the scope(lifetime) of the variable depends on the place where it has been declared. This ... Read More
![Rahul Sharma](https://www.tutorialspoint.com/assets/profiles/14297/profile/60_102977-1513054044.jpg)
420 Views
The following are the future reserved words, which include ‘class’. These words are used as keywords in proposed extensions and are therefore reserved to allow for the possibility of future adoption of those extensions.class enum extends super const export ImportThe above is defined in the ECMAScript specification.In ECMAScript 6 Language Specification it is used. The class declaration creates a class −class name [extends] { // body of class }
![Johar Ali](https://www.tutorialspoint.com/assets/profiles/14293/profile/60_101691-1513053093.jpg)
91 Views
The web browser throws an error for “var null” because it is a reserved identifier.You cannot use the following literals as identifiers in ECMAScript −null frue falseundefined A property with no definition. It is not known and not a reserved identifier. Its type is undefined.nullIt is known and a reserved identifier. But “null” isn’t the same as “false”. When you will declare a variable and set it to null, then null will get printed.
![Amit Sharma](https://www.tutorialspoint.com/assets/profiles/14294/profile/60_103411-1513053466.png)
363 Views
Reserved words cannot be used as JavaScript variables, functions, methods, loop labels, or any object names.Here are the reserved words in JavaScript −abstractElseinstanceofswitchbooleanEnumintsynchronizedbreakExportinterfacethisbyteExtendslongthrowcaseFalsenativethrowscatchFinalnewtransientcharFinallynulltrueclassFloatpackagetryconstForprivatetypeofcontinueFunctionprotectedvardebuggerGotopublicvoiddefaultIfreturnvolatiledeleteimplementsshortwhileDoImportstaticwithdoubleInsuper
![Ali](https://www.tutorialspoint.com/assets/profiles/14292/profile/60_101553-1513052445.jpg)
1K+ Views
While naming your variables in JavaScript, keep some rules in mind. The following are the variable naming conventions in JavaScript −You should not use any of the JavaScript reserved keywords as a variable name. These keywords are mentioned in the next section. For example, break or boolean variable names are not valid.JavaScript variable names should not start with a numeral (0-9). They must begin with a letter or an underscore character. For example, 123test is an invalid variable name but _123test is a valid one.JavaScript variable names are case-sensitive. For example, Name and name are two different variables.Here are the Examples −var name; // correct var 2name; ... Read More
![Rahul Sharma](https://www.tutorialspoint.com/assets/profiles/14297/profile/60_102977-1513054044.jpg)
239 Views
Variables can be thought of as named containers. You can place data into these containers and then refer to the data simply by naming the container.While naming your variables in JavaScript, keep the following rules in mind.You should not use any of the JavaScript reserved keywords as a variable name. These keywords are mentioned in the next section. For example, break or boolean variable names are not valid.JavaScript variable names should not start with a numeral (0-9). They must begin with a letter or an underscore character. For example, 123test is an invalid variable name but _123test is a valid one.JavaScript variable names are ... Read More
![Prabhdeep Singh](https://www.tutorialspoint.com/assets/profiles/546958/profile/60_1428686-1667456005.jpg)
11K+ Views
This tutorial will teach us how to replace all occurrences of a string in JavaScript which mean by the end of the tutorial we will learn to detect a given type of substring from the given string and replace it will another given string by the user. To replace all occurrences of a string in JavaScript we have three methods which we are going to see in this tutorial, they are: splitting the string into an array and then joining it back by adding replacement in gaps, with the global regular expression using the replace() method, and at last we ... Read More
![Saurabh Jaiswal](https://www.tutorialspoint.com/assets/profiles/500262/profile/60_1406912-1660202490.jpg)
780 Views
JavaScript is an untyped language because in JavaScript the variables can hold any data type meaning that JavaScript does not have a type declaration and when the variable is created we do not need to specify any data type unlike other programming languages like Java, C#, C++, etc. which needs int, char, float, etc. to create a variable. In JavaScript we use var, let, and const to create a variable. One of the best parts of untyped language is it gives the flexibility to reassign any type of value to a variable, it doesn't matter whether the initialized value was ... Read More