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 Next TopicHow does JavaScript Work |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India