day 1 reviewed

pull/91/head
Asabeneh 5 years ago
parent d1b2fc8dca
commit 65bc076e0b

@ -1,3 +1,4 @@
// the variable values can be accessed from other variable.js file
console.log(firstName, lastName, country, city, age, isMarried) console.log(firstName, lastName, country, city, age, isMarried)
console.log(gravity, boilingPoint, PI) // 9.81, 100, 3.14 console.log(gravity, boilingPoint, PI) // 9.81, 100, 3.14
console.log(name, job, live) console.log(name, job, live)

@ -1,17 +1,20 @@
// Declaring different variables of different data types // Declaring different variables of different data types
let firstName = 'Asabeneh' // first name of a person
let lastName = 'Yetayeh' // last name of a person let firstName = 'Asabeneh' // first name of a person
let country = 'Finland' // country let lastName = 'Yetayeh' // last name of a person
let city = 'Helsinki' // capital city let country = 'Finland' // country
let age = 100 // age in years let city = 'Helsinki' // capital city
let age = 100 // age in years
let isMarried = true let isMarried = true
// Declaring variables with number values // Declaring variables with number values
const gravity = 9.81 // earth gravity in m/s2
const boilingPoint = 100 // water boiling point, temperature in oC const gravity = 9.81 // earth gravity in m/s2
const PI = 3.14 // geometrical constant const boilingPoint = 100 // water boiling point, temperature in oC
const PI = 3.14 // geometrical constant
// Variables can also be declaring in one line separated by comma // Variables can also be declaring in one line separated by comma
let name = 'Asabeneh', //name of a person
let name = 'Asabeneh', //name of a person
job = 'teacher', job = 'teacher',
live = 'Finland' live = 'Finland'

Loading…
Cancel
Save