Skip to content
This repository was archived by the owner on Jan 14, 2024. It is now read-only.

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

The next data type we will learn is number.

Unlike strings, numbers do not need to be wrapped in quotes.

var age = 30;

You can use mathematical operators to caclulate numbers:

var sum = 10 + 2; // 12
var product = 10 * 2; // 20
var quotient = 10 / 2; // 5
var difference = 10 - 2; // 8

Exercise

  • Create two variables numberOfStudents and numberOfMentors
  • Log a message that displays the total number of students and mentors

Expected result

Number of students: 15
Number of mentors: 8
Total numnber of students and mentors: 23