Type Conversion and Type Coercion in JavaScript

Опубликовано: 01 Январь 1970
на канале: SALESFORCE PREDATOR
726
17

Type Conversion :

Conversion using built-in Functions by Developers
Example : String() , Number() and Boolean().

String()
Number()
Boolean()


Type Coercion:

The process of automatic or implicit conversion of values from one data type to another.

Since JavaScript is a weakly-typed language, in some scenarios Conversions are done by compiler automatically.
Example : 1== null

Rules :

String on any side of operand returns converts into string before operation.
No String on either side with all primitives, it converts into Number before operation.
Array, Objects are considered as string before conversion.

Join Graphy/unacademy using this link https://www.graphy.com?fpr=pankaj96 and get best discounts on the courses.


На этой странице сайта вы можете посмотреть видео онлайн Type Conversion and Type Coercion in JavaScript длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь SALESFORCE PREDATOR 01 Январь 1970, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 726 раз и оно понравилось 17 зрителям. Приятного просмотра!