I've tried assigning different data types such as boolean, numbers, strings, objects, nulls, etc, but keep getting false returned. Any ideas?
What JavaScript value should you assign to a variable x so that typeof x = = = x would be true?
217 views Asked by Almac At
1
The
typeof
operator always returns a string value. As such, your original value must be a string. The result oftypeof
for a string is"string"
, and so: