parent
55d8e3dbc0
commit
b9cb06004d
@ -0,0 +1,39 @@
|
||||
// 5
|
||||
const string = "string";
|
||||
const boolean = true;
|
||||
const undefin = undefined;
|
||||
const nill = null;
|
||||
|
||||
console.log(typeof string);
|
||||
console.log(typeof boolean);
|
||||
console.log(typeof undefin);
|
||||
console.log(typeof nill);
|
||||
|
||||
// 6
|
||||
let one;
|
||||
let two;
|
||||
let three;
|
||||
let four;
|
||||
|
||||
// 7
|
||||
let one1 = 1;
|
||||
let two2 = 2;
|
||||
let three3 = 3;
|
||||
let four4 = 4;
|
||||
|
||||
// 8
|
||||
let First_name;
|
||||
let Last_name;
|
||||
let Marital_status;
|
||||
let Country;
|
||||
let Age;
|
||||
|
||||
// 9
|
||||
let first_name, last_name, marital_status, country, age;
|
||||
|
||||
// 10
|
||||
let myAge = 25,
|
||||
yourAge = 19;
|
||||
|
||||
console.log(`I am ${myAge} years old.`);
|
||||
console.log(`You are ${yourAge} years old.`);
|
||||
@ -0,0 +1,8 @@
|
||||
// 1
|
||||
// comments can make code readable
|
||||
|
||||
// 2
|
||||
// Welcome to 30DaysOfJavaScript
|
||||
|
||||
// 3
|
||||
/* comments can make code readable, easy to reuse and informative */
|
||||
@ -0,0 +1,5 @@
|
||||
// 4
|
||||
const string = "string";
|
||||
const boolean = true;
|
||||
const undefin = undefined;
|
||||
const nill = null;
|
||||
@ -1,17 +0,0 @@
|
||||
// Declaring different variables of different data types
|
||||
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
|
||||
|
||||
// Declaring variables with number values
|
||||
const gravity = 9.81 // earth gravity in m/s2
|
||||
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
|
||||
let name = 'Asabeneh', //name of a person
|
||||
job = 'teacher',
|
||||
live = 'Finland'
|
||||
Loading…
Reference in new issue