diff --git a/01-Fundamentals-Part-1/starter/index.html b/01-Fundamentals-Part-1/starter/index.html index 59529c7923..49a4a311e0 100755 --- a/01-Fundamentals-Part-1/starter/index.html +++ b/01-Fundamentals-Part-1/starter/index.html @@ -25,5 +25,7 @@

JavaScript Fundamentals – Part 1

+ + diff --git a/01-Fundamentals-Part-1/starter/script.js b/01-Fundamentals-Part-1/starter/script.js new file mode 100644 index 0000000000..fa551c79e1 --- /dev/null +++ b/01-Fundamentals-Part-1/starter/script.js @@ -0,0 +1,20 @@ +const firstName = "Jonas"; +const job="teacher"; +const birthyear=1991; +const year=2037; +const jonas = "I'm " + firstName + ',a ' + (year-birthyear) +' years old ' +job +//template literals +const jonasNew = `I'm ${firstName}, +a ${year-birthyear} +years old ${job}` +console.log(jonas); +console.log(jonasNew); +//decisions +const age=15; +const isOldEnough=age>=18; //if the age is 18 or older then it is true +isOldEnough ? console.log("Sarah can start driving license 🚗") : console.log(`Sarah is too young. Wait another ${18 - age} years :)`); +const birthYear=1991; +let century; +century = birthYear <= 2000 ? 20 : 21; +console.log(century) +//type conversion \ No newline at end of file diff --git a/02-Fundamentals-Part-2/starter/index.html b/02-Fundamentals-Part-2/starter/index.html index ee4909e282..2f97ecfce5 100755 --- a/02-Fundamentals-Part-2/starter/index.html +++ b/02-Fundamentals-Part-2/starter/index.html @@ -1,11 +1,11 @@ - - - - - JavaScript Fundamentals – Part 2 - - - -

JavaScript Fundamentals – Part 2

- - + + + +

JavaScript Fundamentals – Part 2

+ +