
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
Why is case sensitivity so much more important in JavaScript?
A script is in plain text and not just markup like HTML, which is case insensitive. In JavaScript, the while keyword, should be "while", not "While" or "WHILE". Case sensitivity is important since it is closely related to HTML, but some methods and events are mentioned differently.
Some tags and attributes in HTML have the same name as JavaScript objects and properties. In HTML, the attribute and tag names are case-insensitive. The close association of HTML and JavaScript can lead to confusion, so case sensitivity is more important in JavaScript. For example, HTML onclick event attribute is mentioned as onClick in HTML but should be onclick in JavaScript.
The following two words in JavaScript are completely different:
var demo; var DEMO;
The following are different object due to the case-sensitive features of JavaScript:
function Employee(id, name, subject){ this.id = id; this.name = name; } var employee = new Employee("ee1", “John”,”30”);
While working with JavaScript, do check for capitalization of variable, function and object name. This will prevent syntax and other errors.
- Related Articles
- Why Is CRM So Important?
- Why is electricity so important?
- Why is Rust Programming language loved so much?
- Implement case sensitivity in MySQL SELECT statements
- Why is that Air Conditioners consume so much electricity?
- Change user settings for case sensitivity in SAP 6.0
- What is the role of eardrum? Why it is so important for us?
- Who is Kumar Vishwas? Why he is so much known as poet?
- Why is Python so much of a pain for Enterprise Projects?
- Hearing Aids in 2023: Why Do They Cost So Much?
- Creating an empty HybridDictionary with specified case sensitivity in C#
- Why there is so much fuss about MS Dhoni's retirement?
- Why is Algebra important?
- Why is light important?
- Why is indentation important in Python?
