if(x == "")
=== do not try to coerce the type of the variables you are testing, while
== will do its best to 'typecast' those variables if needed to compare them.
1 == '1' returns
1 === '1' returns
false since you are comparing a number to a string.
== operators. Hence, there will not be any difference between the two.
The MDN documentation is pretty good too.
== operator will compare for equality after doing any necessary type conversions. The
=== operator will not do the conversion, so if two values are not the same type
=== will simply return false. Both are equally quick.
For more you can check this answer in stack oveflow