WEEK 2: JavaScript Values, Types & Operators
(January 18)

To Do This Week:

NO CLASS on Monday January 16th – MLK DAY. We will meet on Wednesday the 18th.

CodeAcademy – just the lessons, not the projects 
Learn Javascript :
. Welcome to Learn JavaScript”,
2. “
Introduction to JavaScript“, “Variables,”
3. “Conditionals”

Read (optional): Eloquent Javascript


JavaScript Lecture/Demo: Variables and Conditionals

JavaScript Starter file



Change Circles Script

Circles / Letters

Student Pairings

Download the Circles file (control click page) or get the source code and make a new file in Sublime text. Then, with your partner, make changes. First talk about what 3 things you want to change in the script. Then list the steps needed for each change. Try to find the JavaScript code. Use ChatGPT or ask me.

Remember, if your script stops working. Command + Option + J opens the console with the line of the error. Or “inspect element” and look for the Console in the panel. 



How to use Snippets

  1. In Sublime Text go to Tools>Developer>New Snippet
  2. In the <content> tag and between <![CDATA[ …… ]]> add the following code:

    <!DOCTYPE html>
    <html lang="en">
    <meta charset="utf-8">
    <title> </title>
    <link rel="stylesheet" href="css/styles.css">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="js/scripts.js"></script>

    Remove comments for line six and set your trigger word (such as html): <tabTrigger>html</tabTrigger>
  3. Save your snippet in a file ending in “sublime-snippet.” On Mac, user created snippets are saved at: 
    Users/”Your User Name”/Library/Application Support/Sublime Text 3/Packages/User