+ 4
Anyone pls explain what s the exact meaning of "case sensitive"..??
javascript
5 Antworten
+ 19
S and s are different.. That is case sensitive.
Depending upon Uppercase and lowercase..
var X and var x are different
+ 7
case = capitals or not
THIS and this are not the same
or even This or tHis
+ 3
Case sensitive is the difference between upper and lower cases 👍🏻
+ 3
Case sensitive means taking the case type (uppercase and lowercase) into consideration when we do a string comparison.
For example, we have 4 string variables here.
// all lowercase
var stringA = "this is a text";
// mix of lowercase and uppercase
var stringB = "This is a Text";
// all uppercase
var stringC = "THIS IS A TEXT";
// all uppercase
var stringD = "THIS IS A TEXT";
print(stringA == stringB);
// false
print(stringB == stringC);
// false
print(stringC == stringD);
// true
+ 2
When writing code a computer sees the value of a capital letter, A for example, as an ASCII value of 65, but to know whether an "A" or lower case "a" the lower case "a" has to be given a different ascii value. I believe it's 97. This is why case sensitive is important in needs to know which ascii value you require 65, or 97.