posted 3 months ago

If you are asking about the syntax for comparing two strings for equality, see this article

[OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]

Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2

posted 3 months ago

here is the answer,

We can use '==' for equal comparision, != for not equal and '====' for strict equal comparision and !== for strict not equal.

strict means in javascript, checking for value and type.

1==='1' are not equal as even though value 1 and '1' are equal but different type number & string.

so 1==='1' will give false.

ask any specific question you have so i can address it

We can use '==' for equal comparision, != for not equal and '====' for strict equal comparision and !== for strict not equal.

strict means in javascript, checking for value and type.

1==='1' are not equal as even though value 1 and '1' are equal but different type number & string.

so 1==='1' will give false.

ask any specific question you have so i can address it