diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000..34101fdf17 Binary files /dev/null and b/.DS_Store differ diff --git a/01-Fundamentals-Part-1/.DS_Store b/01-Fundamentals-Part-1/.DS_Store new file mode 100644 index 0000000000..0e6f7f1676 Binary files /dev/null and b/01-Fundamentals-Part-1/.DS_Store differ diff --git a/01-Fundamentals-Part-1/assignment/assignment.js b/01-Fundamentals-Part-1/assignment/assignment.js new file mode 100644 index 0000000000..753364784c --- /dev/null +++ b/01-Fundamentals-Part-1/assignment/assignment.js @@ -0,0 +1,112 @@ +// // let country = 'United Arab Emirates' +// // let continent = 'MEA' +// // let population = '4 Million' + + +// // console.log(country) +// // console.log(continent) +// // console.log(population) + + +// // let javascriptIsFun = true; +// // console.log(javascriptIsFun); + + +// // console.log(typeof javascriptIsFun); +// // console.log(typeof country) +// // console.log(typeof 23) +// // console.log(typeof "faizan") +// // console.log(typeof faizan) + +// // let year; +// // console.log(typeof year) +// // year = 1991; +// // console.log(typeof year) + +// // console.log(typeof null) + +// // const now = new Date().getUTCFullYear(); + +// // console.log(now) +// // const ageFaizan = now - 1984; +// // const ageSoubia = now - 1986; + +// // console.log(ageFaizan, ageSoubia) +// // let x = 10 + 15 // answer will be 15 +// // console.log(x) + +// // x += 10 // x=x+10 current x value is 25 +// // console.log(x) + + +// // console.log(typeof x) + +// // console.log(ageFaizan > ageSoubia) + + +// let massMark; +// let heightMark; +// let massJohn; +// let heightJohn; + + + + +// massMark = 78; +// heightMark = 1.69; +// massJohn = 92; +// heightJohn = 1.95; + +// let bmiMark = massMark / (heightMark * heightMark) + +// let bmiJohn = massJohn / (heightJohn * heightMark) + + +// let markHigherBMI = bmiMark > bmiJohn; +// console.log(bmiMark); +// console.log(bmiJohn); + +// console.log(markHigherBMI) + + +// const firstName = "Faizan" +// const job = "Senior Manager" +// const birthYear = 1984; +// const year = new Date().getUTCFullYear(); + +// const faizan = `I'm ${firstName}, a ${year - birthYear} years old ${job}`; +// console.log(faizan) + + +// console.log(`This is a template literal example \n\with multiple lines`) + +// console.log(`we can do +// multiple lines l +// ike this also. +// it does not need that \ n way of +// moving to next line.`) + + + + +// const age = 17; +// const isOldEnough = age >= 18; + +// if (isOldEnough) { +// console.log(`Sarah can start driving lesson 🚗`) +// } else { +// const yearsLeft = 18 - age; +// console.log(`Sarah is still young to drive. wait another ${yearsLeft} years ❌`) +// } + +// // if (!isOldEnough) { +// // console.log(`Sarah cannot start driving yet ❌`) +// // } + + +function getRandomInt(max) { + return Math.floor(Math.random() * max); +} +let score = getRandomInt(1000) + +console.log(score) \ No newline at end of file diff --git a/01-Fundamentals-Part-1/assignment/index.html b/01-Fundamentals-Part-1/assignment/index.html new file mode 100755 index 0000000000..b965d03234 --- /dev/null +++ b/01-Fundamentals-Part-1/assignment/index.html @@ -0,0 +1,36 @@ + + + + + + + + JavaScript Fundamentals – Part 1 + + + + + +

JavaScript Fundamentals – Part 1

+ + + \ No newline at end of file diff --git a/01-Fundamentals-Part-1/final/index.html b/01-Fundamentals-Part-1/final/index.html index 96fbc80614..7bb7d69164 100755 --- a/01-Fundamentals-Part-1/final/index.html +++ b/01-Fundamentals-Part-1/final/index.html @@ -1,31 +1,37 @@ - - - - - JavaScript Fundamentals – Part 1 - - - -

JavaScript Fundamentals – Part 1

- - - + + + + + JavaScript Fundamentals – Part 1 + + + + +

JavaScript Fundamentals – Part 1

+ + + + + \ No newline at end of file diff --git a/01-Fundamentals-Part-1/final/script.js b/01-Fundamentals-Part-1/final/script.js index c966226c88..2984ba015e 100644 --- a/01-Fundamentals-Part-1/final/script.js +++ b/01-Fundamentals-Part-1/final/script.js @@ -1,3 +1,28 @@ +let js = "amazing"; +//if (js === "amazing") alert("Javascript is FUN!") +console.log(40 + 8 + 23 - 10); +console.log("Faizan") + +let firstName = "faizan aqeel" +console.log(firstName) +console.log(firstName) + +console.log(firstName) +console.log(firstName) + +//Uncaught SyntaxError: Invalid or unexpected token (at script.js:13:5)Understand this errorAI +//let 3years = 3; +//variable cannot start with a number + +//let faian& aqeel = "JM" + +//reserved keywords cannot be used as well in Javascript. +//new is a reserved word +//but it can still be used by adding a dollar $ Sign as you can see below +// new , function, name and etc... + +let $new = 17; + /* //////////////////////////////////// // Linking a JavaScript File diff --git a/01-Fundamentals-Part-1/starter/index.html b/01-Fundamentals-Part-1/starter/index.html index 59529c7923..78052fa464 100755 --- a/01-Fundamentals-Part-1/starter/index.html +++ b/01-Fundamentals-Part-1/starter/index.html @@ -1,29 +1,42 @@ - - - - - JavaScript Fundamentals – Part 1 - - - -

JavaScript Fundamentals – Part 1

- - + + + + + + JavaScript Fundamentals – Part 1 + + + + + +

JavaScript Fundamentals – Part 1

+ + + \ No newline at end of file