JavaScript Hello World
Topics covered:- Attaching a .js file to an HTML web page
- Running your first JS code: 'Hello World'
- Google Chrome's Dev Tools + the Console.
- Calling Functions (console.log)
- HTML buttons
- Writing functions
- Demo: Button Onclick Event Changes innerHTML of h1
- Setting up a JS file
- Console output: w3 Tutorial
- Variables (Use let instead of var): w3 Tutorial
- Arithmetic Operations and Incrementing: w3 Tutorial
- Assignment: w3 Tutorial
For the next few weeks you will "learn at your own pace" by following along and coding for yourself with an online video course posted by Scrimba.
The Scrimba course will guide you through the creation of 3 Web-App HTML/CSS/JavaScript projects which you will complete. .. However, after the First and Third projects, you will demonstrate your new skills by making a similar app of your own specific design/code by yourself.
The entire Course is in one *LONG* video. Luckily, video has mostly-complete YouTube Chapter Bookmarks, so you can easily jump to each chapter in the description below the video.
*At the end of each class, you may wish to write down the exact time code where you finished the previous day. eg, in your JavaScript file*
The course outline is here: https://scrimba.com/learn/learnjavascript.
- For this exercise, you will be completing Scrimba's Learn JS Course lessons 1-28, 31 OR watch on YouTube: The Course Video is HERE: https://www.youtube.com/watch?v=jS4aFq5-91M and watch from 0:00 to 1:15:42 (this may take several classes to watch, pause, and follow along with)
- Skip lessons 29 and 30, you do not need to deploy your project to Netlify.
- In your own Text Editor (VSCode or Notepad++) create the entire project for yourself as you watch the video.
- Ms. Wear will mark this in class. Demonstrate the app working with the console open and no js errors, validate the CSS and the HTML.
- Adding a button : w3 Tutorial
- onclick event listener in HTML : w3 Tutorial
- functions : w3 Tutorial
- The Document Object Model (how JavaScript accesses parts of your html web page and its styles): https://www.w3schools.com/js/js_htmldom.asp
- innerText and innerHTML : w3 Tutorial
- modifying CSS with JS : innerHTML w3 Tutorial, innerText w3 Tutorial
- Intro to Strings : w3 Tutorial
- Data Types in JavaScript and Weak Typing: https://www.w3schools.com/js/js_datatypes.asp
- Parsing a String to a Number: W3 Tutorial
- Adding Strings (Concatenation) and += : Tutorial

Write a American Football Score Board app in JavaScript, HTML, and CSS.
- The layout should be similar to the one in the image.
- Use your own creativity to make it look good. The colors/fonts/size does not have to be the same as in the image.
- Points are scored as follows:
Touchdown: 6 points
Field Goal: 3 points
Safety: 2 points
Conversion (Field Goal): 1 point
Conversion (Touchdown): 2 points - Create a button for each type of points scored (there are 5 types listed above) underneath the Home score and the Guest score that add the appropriate value to the score.
- Create a single "reset" button that resets both scores to 0
Assessment
- All criteria met and everything works correctly (/10)
- HTML and CSS Validate and No JS Errors(/5)
Continue to "learn at your own pace" by following along and coding for yourself a Blackjack Game with the next part of the video course.
Step 1: Complete the Blackjack Game:-
Do the BlackJack lessons 1-54 at Scrimba Learn JavaScript.
OR
Watch the Youtube video. The Blackjack section of the video starts here: https://youtu.be/jS4aFq5-91M?t=5488. Follow the YouTube video from 1:31:28 to 4:15:00 (this will take several classes to watch, pause, and follow along with)
The video has mostly-complete YouTube Chapter Bookmarks, so you can easily jump to each chapter in the description below the video. *At the end of each class, you may wish to write down the exact time code where you finished the previous day. eg, in your JavaScript file.
- In your own Text Editor (ex. VSCode) create the entire project for yourself as you follow the lessons or watch the video.
-
When the instructor breaks out a new 'practice / 'deep-dive' JavaScript code file to teach a lesson specifically about the following concepts separately,
DON'T delete your all your code! Instead, open a new web browser tab and go to OnlineGDB and immediately choose the language: JavaScript(Rhino).
Use OnlineGDB to test the JS from the lessons listed below. The other lessons can be done in VS Code. In OnlineGDB, useprint()
instead ofconsole.log()
.- Lesson 3: If/Else Statements and Conditionals
- Lesson 21: Intro to Arrays
- Lesson 22: Array Indexes
- Lesson 23: Arrays with Multiple Data-Types
- Lessons 28-30: 'For' Loops and For Loops to iterate through Arrays and DOM
- Lesson 34: Returning values in functions
- Lesson 36 - 40: Generating Random numbers with Math.random() and Math.floor()
- Lesson 45 and 46 and 47: The logical AND operator and the logical OR operator.
- Lesson 50 and 51: Intro to Objects, Writing Your Own Objects
Once you have finished the program matching the video at 4hrs15mins, add:
- At the bottom of the game interface, create and style text that says 'Player Name', a text box, and add a 'Enter' button that allows the user to save their name to the program. Save their name in the
player
object. and add the user's name in the game interface next to their $ chips value. For example, if the player was named Suzy, it would say "Suzy $200". Hint: Read example 1 of this tutorial. - Disable all buttons until after the user has submitted their name. When disabled, the button should be grey. When enabled, the button should be colored (orange or whatever color you've chosen). Read this Tutorial
- The "Next Card" button should only be enabled while the game is in play.
- Add a "Stand" button next to the "Next Card" button. If the player stands before going over 21, the game is completed. The Stand button should only be enabled when the game is in play.
- Once a game is in play, disable "Start Game" again until the game is complete.
This exercise is for students with previous programming experience who have finished the Black Jack Project early.
Write a Interactive Color Mixer app.