Is JavaScript Case-sensitive?
Hey, what's up? I am Binit Ghimire. I usually get asked one question from several people: "Hey Binit, is JavaScript case-sensitive?", "Binit, JavaScript is case-sensitive or not?", "Hey, do you know whether JS is case-sensitive or not?", "Hey dude, is JS case-sensitive?", and a lot of different questions which give the same meaning. i.e. Is JavaScript Case-sensitive?.
All JavaScript identifiers are case-sensitive.
For example, here's a JS code:
var sitename, Sitename, siteName, sItEnAmE, SiTeNaMe, siteNAME, SITENAME, SITEname, SIteNAme, siTENAme, siTEnaME
sitename = "Binit Ghimire"Sitename = "Binit Ghimire"siteName = "Binit Ghimire"sItEnAmE ="Binit Ghimire"SiTeNaMe = "Binit Ghimire"siteNAME= "Binit Ghimire"SITENAME = "Binit Ghimire"SITEname = "Binit Ghimire"SIteNAme = "Binit Ghimire"siTENAme = "Binit Ghimire"siTEnaME = "Binit Ghimire"
In the above codes, sitename, Sitename, siteName, sItEnAmE, SiTeNaMe, siteNAME, SITENAME, SITEname, SIteNAme, siTENAme, siTEnaME are all different variables. So, JavaScript is case-sensitive.
No comments: