diff --git a/01_Day_Introduction/exercise_solution/datatype.js b/01_Day_Introduction/exercise_solution/datatype.js new file mode 100644 index 0000000..69c659d --- /dev/null +++ b/01_Day_Introduction/exercise_solution/datatype.js @@ -0,0 +1,4 @@ +console.log(typeof str); +console.log(typeof bool); +console.log(typeof val); +console.log(typeof valNull); diff --git a/01_Day_Introduction/exercise_solution/exercise1.js b/01_Day_Introduction/exercise_solution/exercise1.js new file mode 100644 index 0000000..d7defe3 --- /dev/null +++ b/01_Day_Introduction/exercise_solution/exercise1.js @@ -0,0 +1,8 @@ +// comments can make code readable + +// Welcome to 30DaysOfJavaScript + +/* comments can make code +readable, easy to reuse +and informative +*/ diff --git a/01_Day_Introduction/exercise_solution/index.html b/01_Day_Introduction/exercise_solution/index.html new file mode 100644 index 0000000..25aec01 --- /dev/null +++ b/01_Day_Introduction/exercise_solution/index.html @@ -0,0 +1,16 @@ + + + + + + + Exercise Day1 + + + + + + + + + \ No newline at end of file diff --git a/01_Day_Introduction/exercise_solution/variable.js b/01_Day_Introduction/exercise_solution/variable.js new file mode 100644 index 0000000..91a9368 --- /dev/null +++ b/01_Day_Introduction/exercise_solution/variable.js @@ -0,0 +1,24 @@ +let str = "Lavanya"; +let bool = true; +let val; +let valNull = null; + +// Declare variables to store your first name, last name, marital status, country and age in multiple lines +let fname = "Lavanya"; +let lname = "Sathya"; +let maritalStatus = false; +let country = "India"; +let age = 25; + +// Declare variables to store your first name, last name, marital status, country and age in a single line +let Fname = "lavanya", + Lname = "Sathya", + marital = false, + Country = "India", + Age = 25; + +// Declare two variables myAge and yourAge and assign them initial values and log to the browser console. +const myAge = 25; +const yourAge = 30; +console.log(`I am ${myAge} years old.`); +console.log(`You are ${yourAge} years old.`);