JavaScript type conversion | JavaScript Quiz 2022

Опубликовано: 27 Сентябрь 2022
на канале: JavaScript for Humans
32
3

JavaScript is a dynamically typed language: we don't specify what types certain variables are.

Values can automatically be converted into another type without you knowing, which is called implicit type coercion. Coercion is converting from one type into another.

In this example, JavaScript converts the number 1 into a string, in order for the function to make sense and return a value.

During the addition of a numeric type (1) and a string type ('2'), the number is treated as a string. We can concatenate strings like "Hello" + "World", so what's happening here is "1" + "2" which returns "12".

Follow @dev.bherulal if you want to be not just a developer but a better developer.👨🏻‍💻

#html #css #css3 #javascript #javascriptdeveloper #reactjs #frontenddeveloper #webdeveloper #webdesigners #100daysofcode #jsdeveloper #iambherulal #frontendmentor #coding #codinglife #freecodecamp #vscode #codingbootcamp #seo #wordpress #php #wordpressdeveloper


На этой странице сайта вы можете посмотреть видео онлайн JavaScript type conversion | JavaScript Quiz 2022 длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь JavaScript for Humans 27 Сентябрь 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 32 раз и оно понравилось 3 зрителям. Приятного просмотра!