Are JavaScript variables and methods case sensitive?

Solution

Yes JavaScript variables and methods are case sensitive.

For example:-

var imgName; 
var imgname;

imgName and imgname are two different variable in JavaScript. Similarly,

function mymethod(){

}
function myMethod(){

}

Similarly mymethod() and myMethod() are two different methods in JavaScript. In JavaScript the case sensitivity does not just apply to variable names and methods but also to JavaScript keywords, event handlers, and object properties.

Share this thread

Comments

Comments
comments powered by Disqus

Navigation

Social Media