From 3796a45008ac0c0fee821ff6f72e7b3c10fb4f5b Mon Sep 17 00:00:00 2001 From: Keicee32 Date: Tue, 3 Nov 2020 03:08:35 +0100 Subject: [PATCH] Day 1 challenge done --- Day-1/datatypes.js | 42 ++++++++++++++++++++++++++++++++++++++++++ Day-1/index.html | 13 +++++++++++++ Day-1/script.js | 7 +++++++ Day-1/variable.js | 4 ++++ 4 files changed, 66 insertions(+) create mode 100644 Day-1/datatypes.js create mode 100644 Day-1/index.html create mode 100644 Day-1/script.js create mode 100644 Day-1/variable.js diff --git a/Day-1/datatypes.js b/Day-1/datatypes.js new file mode 100644 index 0000000..c53f205 --- /dev/null +++ b/Day-1/datatypes.js @@ -0,0 +1,42 @@ +let favoriteColor = "Blue"; +let isBoolean = false; +let electionDetails; +let emptyValue = null; +let firstNumber = 0; + +// These are type of each variables +console.log(typeof(favoriteColor)); +console.log(typeof(isBoolean)); +console.log(typeof(electionDetails)); +console.log(typeof(emptyValue)); +console.log(typeof(firstNumber)); + +// These are unassigned variables +let nameOfMom; +let nameOfDad; +let nameOfSister; +let nameOfBrother; + +// These are assigned variables +let currentYear = 2020; +let currentMonth = "November"; +let currentDay = "Tuesday"; +let isEmployed = false; + +// This is my details in multiple lines +let firstName = "Kelechi"; +let lastName = "Egekenze"; +let isMarried = false; +let country = "Nigeria"; +let age = 27; + +// This is my details in single line +//let firstName = "Kelechi"; let lastName = "Egekenze"; let isMarried = false; let country = "Nigeria"; let age = 27; + +// Console to the browser +let myAge = 27; +let yourAge = 30; +console.log("I am 27 years old"); +console.log("I am 30 years old"); +console.log(myAge); +console.log(yourAge); diff --git a/Day-1/index.html b/Day-1/index.html new file mode 100644 index 0000000..ad7b2da --- /dev/null +++ b/Day-1/index.html @@ -0,0 +1,13 @@ + + + + + + Document + + + + + + + \ No newline at end of file diff --git a/Day-1/script.js b/Day-1/script.js new file mode 100644 index 0000000..4893888 --- /dev/null +++ b/Day-1/script.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/Day-1/variable.js b/Day-1/variable.js new file mode 100644 index 0000000..e06ba19 --- /dev/null +++ b/Day-1/variable.js @@ -0,0 +1,4 @@ +let favoriteColor = "Blue"; +let isBoolean = false; +let electionDetails; +let emptyValue = null; \ No newline at end of file