From a4141bf027c3f28be30ef25121dcecc065991b4d Mon Sep 17 00:00:00 2001 From: ronilshakya Date: Wed, 1 Mar 2023 21:33:24 +0545 Subject: [PATCH] day 3 finished --- .../03_day_starter/index.html | 1 + .../03_day_starter/scripts/main.js | 49 ++++++++++++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/03_Day_Booleans_operators_date/03_day_starter/index.html b/03_Day_Booleans_operators_date/03_day_starter/index.html index 2a8e6a8..9cdaf19 100644 --- a/03_Day_Booleans_operators_date/03_day_starter/index.html +++ b/03_Day_Booleans_operators_date/03_day_starter/index.html @@ -8,6 +8,7 @@

30DaysOfJavaScript:03 Day

Booleans, undefined, null, date object

+ diff --git a/03_Day_Booleans_operators_date/03_day_starter/scripts/main.js b/03_Day_Booleans_operators_date/03_day_starter/scripts/main.js index 7762908..003b80c 100644 --- a/03_Day_Booleans_operators_date/03_day_starter/scripts/main.js +++ b/03_Day_Booleans_operators_date/03_day_starter/scripts/main.js @@ -1 +1,48 @@ -// this is your main.js script \ No newline at end of file +// this is your main.js script +console.log(null) +let a = 2; +let b = 2; +console.log(a===b); + + +let num = 10; +num < 5 +? console.log(`${num} is less than 20`) +: console.log(`${num} is not less than 20`) + +// let def = prompt('Enter a number', 'number goes here'); +// console.log(def) + +// let sure = confirm("DO you want to exit page?"); +// console.log(sure) + +let firstName = 'ronil'; +let lastName = 'shakya'; +let country = 'nepal'; +let city = 'lalitpur'; +let age = 20; +let isMarried = false; + +console.log(typeof firstName); +console.log(typeof age); +console.log(typeof isMarried); +console.log(4 !== 4) + +let s1 = 'python'; +let s2 = 'jargon'; +console.log(s1.length == s2.length) + +// let name = prompt("Enter the name"); +// if (name.length > 5) +// console.log('too long') +// else +// console.log('too short') + +let now = new Date(); +let year = now.getFullYear(); +let month = now.getMonth(); +let day = now.getDay(); +let hour = now.getHours(); +let minute = now.getMinutes(); +console.log(`${year}-${month}-${day} ${hour}:${minute}`) +