Javascript Case Sensitivity

Basically JavaScript is a case-sensitive scripting language. It means that the language considers capital letters as different from their lowercase counterparts. For example, if you declare a variable called customerName in JavaScript, you have to use customerName to refer to that variable not CustomerName, CUSTOMERNAME, or some other combination.

JavaScript case sensitivity apply to JavaScript keywords also, event handlers, and object properties or methods. Keywords in JavaScript are all lowercase, for example, while, for, if, else, and so on. On the other hand, methods (properties) use "camel-back" naming convention (first word is in lowercase and each successive first letter of each word is capitalized), for example, toArray(), lastModified(), and so on.

Example

<!DOCTYPE html>
<html>  
<head>
  <!-- www.techstrikers.com -->
<title>Javascript Case Sensitivity Example</title>  
</head>
 <script type="text/javascript">
var customerName = "Peter write";  
var CustomerName = "Charlie S write";  
var CUSTOMERNAME = "Tom write";  
document.write(customerName + '</br>' + CustomerName+ '</br>' + CUSTOMERNAME);  
 </script>
<body>  
</body>  
</html>  
Try Now

See Also

Javascript Built in String Object
Javascript Built in Number Object
Javascript Built in Math Object
Javascript Built in Date Object
Javascript Built in Arrays Object
Javascript Built in Boolean Object
Javascript Built in RegExp Object
Javascript Built in JSON Object


 
SHARE THIS IF YOU LIKE!
submit to reddit
SUBSCRIBE FOR LATEST UPDATES
HAVE WE CONNECTED ON FACEBOOK?
TOP TUTORIALSTOP CODE EXAMPLESTOP LIVE DEMOLINKSSTAY CONNECTED
HTML Tutorial
HTML5 Tutorial
Bootstrap3 Tutorial
Javascript Tutorial
TypeScript Tutorial
AngularJS Tutorial
CSharp Tutorial
PHP Tutorial
Developer Tools
Javascript
AngularJS
Google MAP API V3
ASP.NET
Javascript
AngularJS
Google MAP API V3
Contact Us
Advertise with Us
Privacy Policy
Disclaimer
Stay connected. We actually like you. If you want to get up to the minute updates, then connect with us on your fav below.
 
Twitter   Linkedin   Facebook   Google+    RSS   Pinterest
 
Protected by Copyscape Original Content Checker
 
 
Copyright ©2017 www.techstrikers.com Unauthorized reproduction/replication of any part of this site is prohibited.