HotelInfantesAgres - Bawat tanong, may sagot. Logo

In Computer Science / Senior High School | 2025-06-03

Given the following JavaScript code:
'Hello' === ""hello""
If we run this code in the console, the expected result is that it will return
false
. This is because ___ *
Strings in JS are case-sensitive.
It will not return false
We are using single quotes for the left-hand string and double quotes for the right-hand string.
All of the above.

Asked by Hermioneey7775

Answer (1)

Correct answer: Strings in JS are case-sensitive. In JavaScript, string comparison using === checks for both value and type. Even though 'Hello' and "hello" are both strings, the first letter is uppercase in one and lowercase in the other. Because JavaScript is case-sensitive, it will return false.'Hello' === 'hello' → false because 'H' ≠ 'h'

Answered by Storystork | 2025-06-16