JavaScript for Beginners #15 Type Conversion (Strings to Numbers) | (Numbers to Strings)

preview_player
Показать описание
In this lesson, we will talk about type conversion where we need to explicitly convert between numbers and strings.

0:00 Introduction - type coercion and type conversion
0:28 Example of type coercion with strings and numbers
1:51 Visiting type coercion page on MDN
2:24 What is type conversion/type casting in JavaScript
2:47 Converting a string into a number with Number()
3:39 NaN in JavaScript
4:13 Unary plus operator +
4:40 Revisiting our example with type conversion in place
5:17 parseInt()
6:48 parseFloat()
8:25 Revisiting our example with parseFloat()
9:03 Revisiting our example with parseInt()
9:10 Mixed practice with math operations
12:15 Converting a number into a string with String()
13:07 Converting a number into a string with .toString()
14:05 Converting a number into a string with template literals

JavaScript Playlist:

NodeJS:

VS Code:

MDN Number:

MDN Unary Plus:

MDN parseInt():

MDN parseFloat();

Number to String:

MDN toString():

MDN String():
Рекомендации по теме