From b9cb06004d6e03a5d379dc9319fda1136e975aeb Mon Sep 17 00:00:00 2001 From: KATTASAHAN Date: Tue, 3 Oct 2023 19:48:29 +0530 Subject: [PATCH] Day-1 Done --- 01_Day_Introduction/solutions/datatypes.js | 39 ++++++++++++++++++++++ 01_Day_Introduction/solutions/solutions.js | 8 +++++ 01_Day_Introduction/solutions/variable.js | 5 +++ 01_Day_Introduction/variable.js | 17 ---------- 4 files changed, 52 insertions(+), 17 deletions(-) create mode 100644 01_Day_Introduction/solutions/datatypes.js create mode 100644 01_Day_Introduction/solutions/solutions.js create mode 100644 01_Day_Introduction/solutions/variable.js delete mode 100644 01_Day_Introduction/variable.js diff --git a/01_Day_Introduction/solutions/datatypes.js b/01_Day_Introduction/solutions/datatypes.js new file mode 100644 index 0000000..7d6d3bc --- /dev/null +++ b/01_Day_Introduction/solutions/datatypes.js @@ -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.`); diff --git a/01_Day_Introduction/solutions/solutions.js b/01_Day_Introduction/solutions/solutions.js new file mode 100644 index 0000000..7e8d4fe --- /dev/null +++ b/01_Day_Introduction/solutions/solutions.js @@ -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 */ diff --git a/01_Day_Introduction/solutions/variable.js b/01_Day_Introduction/solutions/variable.js new file mode 100644 index 0000000..dfa2177 --- /dev/null +++ b/01_Day_Introduction/solutions/variable.js @@ -0,0 +1,5 @@ +// 4 +const string = "string"; +const boolean = true; +const undefin = undefined; +const nill = null; \ No newline at end of file diff --git a/01_Day_Introduction/variable.js b/01_Day_Introduction/variable.js deleted file mode 100644 index f5872af..0000000 --- a/01_Day_Introduction/variable.js +++ /dev/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'