-
Numbers are everywhere in programming. You use them to track a player's score in a game, calculate the cost of shipping a product, or count the number of times a "Like" button gets clicked on a page. In this course, you'll learn how to use numbers for useful tasks in your JavaScript programs, including doing math, converting strings to numbers, generating random numbers, and more.
Overview
Syllabus
-
Working with Numbers
Understand the types of numbers JavaScript can work with, how to store numbers in variables, and how to convert strings to numbers.
Chevron 10 steps- instruction
Numbers in JavaScript
-
Numbers in JavaScript Review
5 questions
-
Storing Numbers in Variables
2 objectives
- instruction
Doing Basic Math
-
Create a Program with Math
2:51
-
Math Review
6 questions
-
Doing Math
3 objectives
-
Treating Strings As Numbers
3:32
-
Convert Strings to Numbers
6:52
-
Numbers and Strings
1 objective
The Math Object
JavaScript includes a special "object," called the "Math Object," which lets you perform mathematical operations like creating random numbers, rounding, and more.
Chevron 8 steps-
Perform Operations With the Math Object
4:10
-
Create a Random Number
7:27
-
The Math Object Review
5 questions
-
Use Math Methods
2 objectives
-
Random Number Challenge
1:14
-
Random Number Challenge – Solution
6:04
-
Random Number Challenge – Two Numbers Solution
4:06
-
JavaScript Numbers Review
5 questions
- instruction