You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
698 B
21 lines
698 B
5 years ago
|
// Declaring different variables of different data types
|
||
5 years ago
|
|
||
|
let firstName = 'Asabeneh' // first name of a person
|
||
|
let lastName = 'Yetayeh' // last name of a person
|
||
|
let country = 'Finland' // country
|
||
|
let city = 'Helsinki' // capital city
|
||
|
let age = 100 // age in years
|
||
5 years ago
|
let isMarried = true
|
||
|
|
||
|
// Declaring variables with number values
|
||
5 years ago
|
|
||
|
const gravity = 9.81 // earth gravity in m/s2
|
||
|
const boilingPoint = 100 // water boiling point, temperature in oC
|
||
|
const PI = 3.14 // geometrical constant
|
||
5 years ago
|
|
||
|
// Variables can also be declaring in one line separated by comma
|
||
5 years ago
|
|
||
|
let name = 'Asabeneh', //name of a person
|
||
5 years ago
|
job = 'teacher',
|
||
|
live = 'Finland'
|