Are Variable Names in JavaScript Case Sensitive?

Find out if JavaScript variable names are case-sensitive or not

Variable names in JavaScript are case-sensitive. This means that variables having the same name but different case are considered different from each other. You can see this in the following example:

const foobar = 1;
const fooBar = 2;
const Foobar = 3;
const FooBar = 4;
const FOOBAR = 5;

console.log(foobar); // 1
console.log(fooBar); // 2
console.log(Foobar); // 3
console.log(FooBar); // 4
console.log(FOOBAR); // 5

Hope you found this post useful. It was published . Please show your love and support by sharing this post.