Is JavaScript case sensitive?

Yes, it is a case sensitive language, which means the identifiers, keywords, variables, and function names must be written with a consistent capitalization of letters.

Like many other programming languages, JavaScript has a set of rules for writing JavaScript programs or codes. Using the correct capitalization for naming keywords, identifiers, functions, and variables is one of them that must be followed.

What does it really mean?

It means that if you have created a variable named "temp" and while printing the value of this variable, you will write "Temp" instead of "temp", it will not work properly and somehow will generate an error.

We can understand it more clearly with the help of an example:

Program

Explanation of program

In the above program, we created two variables Marks and marks and assigned them 0,100 values. When printing the value of the variable "marks" it will print 100 instead of 0, because, in JavaScript, marks and Marks are not the same thing even if both variables are spelled the same.

Output

Is JavaScript case sensitive




Contact US

Email:[email protected]

Is JavaScript case sensitive
10/30