FreeFoundation

JavaScript Basics

The behaviour underneath the syntax you already recognise: operators, strings, conditionals, loops, functions, arrays and objects. Ten topics of small snippets where the answer is not what the code looks like it says.

Questions90
Topics10
Answering time68 minutes
At five a day18 days
LevelFoundation

Who it is for

Start here. It assumes you can read the language and nothing else.

You will get the most out of it if you have written JavaScript recently enough to read it without effort, and have been surprised by it at least once.

How long it takes

90 graded questions at roughly 45 seconds each is about 68 minutes of answering in total.

At the default five questions a day, and because the session mixes in your other courses, expect around 18 days — call it 3 weeks — to see everything once, plus a few weeks of thinning reviews after that before it is all mastered.

A question is mastered on the third correct answer, once the gap between reviews has grown past a week — so a course cannot be finished in a weekend however long you sit with it.

Question mix

  • 80 multiple choice
  • 10 concept cards
  • 10 matching questions

Syllabus

What you will be asked about

  1. 01

    Operators & Precedence

    Predict the result of an expression when precedence, not left-to-right reading, decides the grouping.

  2. 02

    Strings & Template Literals

    Predict what a string method returns, and see where a template literal is converting for you.

  3. 03

    Conditionals & Truthiness

    Decide which branch runs by knowing exactly which values are falsy.

  4. 04

    Loops

    Trace how many times a loop body runs and what is left in the loop variable afterwards.

  5. 05

    Functions & Return

    Say what a function hands back, including the times it quietly hands back undefined.

  6. 06

    Arrays: The Basics

    Read and change an array by index and length, and know what each basic operation hands back.

  7. 07

    Objects: The Basics

    Read, add and remove properties, and predict what a missing key gives you.

  8. 08

    Type Conversion: The Basics

    Convert values on purpose with Number, String and Boolean, and know what each one rejects.

  9. 09

    Console & Debugging Basics

    Read what the console actually shows you, and choose a log that answers the question you have.

  10. 10

    Common Beginner Errors

    Spot the mistakes that produce a wrong answer instead of an error message.

A question from this course

Operators & Precedence

What does this print?

console.log(2 + 3 * 4 ** 2);
  • A80
  • B50
  • C146
  • D400
Show the answer

B 50

** goes first (16), then * (48), then + (50). Reading left to right gives 400 — that is the habit to unlearn: precedence decides the grouping before a single value is computed.

The rest of the track

JavaScript at every depth

Start JavaScript Basics
in tomorrow’s session.

Enrol and this course joins your daily five, mixed in with everything else you are studying — 90 questions spread over about 18 days rather than dropped on you at once.

Browse the catalogue