Javascript tutorial - 11 - Comparison Operators in javascript

Publicado el: 06 noviembre 2016
en el canal de: Ranking funny videos
119
1

JavaScript has both strict and type–converting comparisons. A strict comparison (e.g., ===) is only true if the operands are of the same type and the contents match. The more commonly-used abstract comparison (e.g. ==) converts the operands to the same type before making the comparison. For relational abstract comparisons the operands are first converted to primitives, then to the same type, before comparison.

Strings are compared based on standard lexicographical ordering, using Unicode values.

Features of comparisons:

Two strings are strictly equal when they have the same sequence of characters, same length, and same characters in corresponding positions.
Two numbers are strictly equal when they are numerically equal (have the same number value). NaN is not equal to anything, including NaN. Positive and negative zeros are equal to one another.
Two Boolean operands are strictly equal if both are true or both are false.
Two distinct objects are never equal for either strict or abstract comparisons.
An expression comparing Objects is only true if the operands reference the same Object.
Null and Undefined Types are strictly equal to themselves and abstractly equal to each other.

Don't forget to subscribe. More videos coming.


En esta página del sitio puede ver el video en línea Javascript tutorial - 11 - Comparison Operators in javascript de Duración hora minuto segunda en buena calidad , que subió el usuario Ranking funny videos 06 noviembre 2016, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 119 veces y le gustó 1 a los espectadores. Disfruta viendo!