JavaScript Numbers, Number Methods, isNaN | JavaScript Tutorial for Beginners

preview_player
Показать описание

In this video we'll discuss JavaScript numbers and several useful JavaScript number methods. All in less than 8 minutes!

✅ Quick Concepts outline:
(00:00) Intro
(0:08) Dev Environment
(0:30) Integers
(0:42) Floats
(0:50) When JavaScript shows decimals
(1:10) Number data vs String data in the console window
(1:20) Comparing Integers and Floats
(1:47) Equations with Strings vs Numbers
(2:05) The Number() function
(2:33) "Not a Number" aka NaN
(2:50) Boolean data represented as Numbers
(2:58) 0 === false
(3:06) isInteger() method
(3:21) parseFloat() method
(3:47) toFixed() method
(4:04) parseInt() method
(4:17) toString() method
(4:35) Chaining methods using dot notation

📚 Further Reading:

📺 More Beginner JS Videos:

✅ Follow Me:

#Javascript #Numbers #Tutorial
Рекомендации по теме
Комментарии
Автор

Thanks. The difference between global isNaN() and Number.isNaN is interesting.

jiweihe
Автор

3:58


outputs - 142.03 // Why doesn't it output 142.04??

GoGetSP
Автор

Please tell one example of a parameter when
Number.isNaN() will return true?

GoGetSP
Автор

Thank you for another lesson!
Honestly I didn't get the concept of Number.isNaN()

I went to MDN to get some more information about this method and can't say that it helped. I couldn't think of examples when Number.isNaN() can possibly return "true". But in MDN there are few examples of it -

Number.isNaN(NaN); // true
Number.isNaN(Number.NaN); // true
Number.isNaN(0 / 0); // true

Grihlo
join shbcf.ru