Skip to content

Week 1: JavaScript Basics

Reid Russom edited this page Jan 26, 2024 · 5 revisions
Week Topic Learning Objectives Key Resources
1 JS Basics Students will be able to fork a Replit file; declare string, numerical, and boolean variables; practice with concatenating strings; and complete basic math problems. Week 1 Slides

Overview

Here is an overview of what students cover this week:

  • Problem-Solving

    • Problem solving is the most important programming skill. To solve a problem, first understand it completely by restating it in plain language. Next, plan the solution by sketching the UI, identifying inputs/outputs, and writing out the step-by-step algorithm in pseudo code.
    • Break big problems down into subproblems. Start by solving the smallest subproblem. Solving each subproblem will reveal the next or make the next one easier to solve. Decomposing big problems into smaller ones is the main way to manage complexity.
    • Practice building lots of programs to improve problem solving skills. The quantity of practice is important. Don't try to solve one big complex problem in one go. Break it down and divide-and-conquer.
  • Coding Fundamentals

    • Variables are "storage containers" for data and can be declared using var, let, or const. Numbers are important for math operations. Use operators like +, -, *, / and % to perform math on numbers.
    • You can add, subtract, multiply, divide, increment, decrement numbers and variables containing numbers. Be careful when mixing numbers and strings. Follow order of operations.
    • Access browser developer tools to view the console. Print to the console with console.log(). Practice math and variables here before adding to webpages. Unary plus converts strings to numbers.
  • Strings and Conditionals

    • Strings represent text and have built-in methods like replace(), slice(), etc. Use single, double, or backtick quotes for strings. Join strings together with +.
    • Conditionals allow you to control program flow based on comparisons (> , < , ==, etc). Logical operators (&&, ||, !) combine conditions. if/else, switch, and ternary (? :) conditionals exist. Practice using strings, logical/comparison operators, and if/else conditional statements. Concatenate strings, embed variables into strings. Understand truthy/falsy values. Nest conditionals for complex logic.
  • Weekly Coding Assignment

    • The key goals are to practice core language fundamentals, use comments/console logs effectively, and write conditional logic.
    • Students should watch out for small syntax issues, data type and conversion errors, and make sure to break down complex math concepts.

Guidance for Mentors

  • Code the Dream's curriculum uses materials from Project Odin, an open-source text curriculum, and Scrimba for video content. Some returning students might be used to Treehouse; we replaced Treehouse with Scrimba in January 2024.
  • Since this is the first week of "real" content, you might see many students for the first time in your mentor sessions. Put lots of effort these first few weeks into relationship-building. It will pay off in the long run if students feel comfortable and safe in your mentor sessions. Check the Big Picture Resources page for ideas on making students feel comfortable in the sessions.

Potential FAQs or trouble spots from this week include:

  • Students may have lots of questions early on about expectations. As a quick reminder:
    • Students should attend at least one mentor session each week.
    • Deadlines are "soft" – there is no penalty for turning in an assignment late – but students who get 2+ weeks behind are very unlikely to finish the class.
    • Scrimba is free for students - if it asks them to pay, they should go back and click the coupon code link Mary Alice sent them!

Assignment Rubric

Grading this first week should be pretty straightforward! You can mark the student's assignment as complete if they:

  • Have forked the Replit file and submitted their assignment.
  • console.log inputs properly for each of the 15 questions.
  • Use proper syntax and good JavaScript logic to solve each question. Example answers link. (Note that some student variation is expected!)

Key Pages

Overview of the wiki.

Onboarding guide for new volunteers.

Links to pages for specific assignments, including rubrics, overviews of student content, and mentor-created resources.

Clone this wiki locally