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.
25 lines
837 B
25 lines
837 B
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
|
|
let isMarried = true;
|
|
|
|
console.log(firstName, lastName, country, city, age, isMarried);
|
|
|
|
// Declaring variables with number values
|
|
const gravity = 9.81; // earth gravity in m/s2
|
|
const boilingPoint = 100; // water boiling point, temperature in °C
|
|
const PI = 3.14; // geometrical constant
|
|
console.log(age, gravity, boilingPoint, PI);
|
|
|
|
// Returns 9.81 100 3.14
|
|
|
|
// Variables can also be declaring in one line separated by comma, however I recommend to use a seperate line to make code more readble
|
|
let name = "Asabeneh",
|
|
job = "teacher",
|
|
live = "Finland";
|
|
console.log(name, job, live);
|
|
|
|
// Returns Asabeneh teacher Finland
|