Javascript Is Case Sensitive Options

codeling 1247 - 5334
@2019-11-27 11:49:13

JavaScript is a case-sensitive language. This means that language keywords, variables, function names, and any other identifiers must always be typed with a consistent capitalization of letters. The while keyword, for example, must be typed “while”, not “While” or “WHILE”.


codeling 1247 - 5334
@2019-11-27 11:54:08

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 or onclick in HTML but should be onclick in JavaScript.


codeling 1247 - 5334
@2019-12-21 19:07:18

Another exmaple is that the following two function calls are different:

DisableEnableLink('DataPanel1_ActionLink');
DisableEnableLink('DataPanel1_actionLink');

Some time this kind of name/id difference is very hard to notice in the Javascript code.

Users browsing this topic
Guest