diff --git a/01_Day_Introduction/01_day_starter/day1_solution/comments.js b/01_Day_Introduction/01_day_starter/day1_solution/comments.js new file mode 100644 index 0000000..51bb85f --- /dev/null +++ b/01_Day_Introduction/01_day_starter/day1_solution/comments.js @@ -0,0 +1,7 @@ +// comments can make code readable +// Welcome to 30DaysOfJavaScript + +/* + comments can make code readable, + easy to reuse and informative +*/ diff --git a/01_Day_Introduction/01_day_starter/day1_solution/datatypes.js b/01_Day_Introduction/01_day_starter/day1_solution/datatypes.js new file mode 100644 index 0000000..c4ba970 --- /dev/null +++ b/01_Day_Introduction/01_day_starter/day1_solution/datatypes.js @@ -0,0 +1,5 @@ +console.log(typeof studentName); +console.log(typeof learning); +console.log(typeof age); +console.log(typeof score); +console.log(typeof grade); diff --git a/01_Day_Introduction/01_day_starter/day1_solution/variable.js b/01_Day_Introduction/01_day_starter/day1_solution/variable.js new file mode 100644 index 0000000..c68db1c --- /dev/null +++ b/01_Day_Introduction/01_day_starter/day1_solution/variable.js @@ -0,0 +1,28 @@ +// Create a variable.js file and declare variables and assign string, boolean, undefined and null data types + +let newStudentName = "Mujeeb ur Rahman"; +let learning = true; +let newAge = 25; +let score; +let grad = null; + +let firstVariable; +let secondVariable; +let thirdVariable; +let fourthVariable; + +let fifthVariable = "fifthVariable"; +let sixthVariable = 6; +let seventhVariable = true; +let eighthVariable = 8.0; + +let myFirstName = "Mujeeb ur", + myLastName = "Rahman", + materialStatus = "single", + myCountry = "Pakistan", + myAge = 30; + +let yourAge = 25; + +console.log(`I am ${myAge} years old`); +console.log(`You are ${yourAge} years old`); diff --git a/01_Day_Introduction/01_day_starter/index.html b/01_Day_Introduction/01_day_starter/index.html index 7ed5b19..71ce6ec 100644 --- a/01_Day_Introduction/01_day_starter/index.html +++ b/01_Day_Introduction/01_day_starter/index.html @@ -1,19 +1,18 @@ +
+