Learn JavaScript

Lesson 7 of 9 · Functions: Declarations, Arrows, Defaults and Rest

Module 5 · Functions: Declarations, Arrows, Defaults and Rest

Problems: Functions

Free with an accountProblems

Ten problems, graded against hidden tests on Node 22, the same JavaScript the Playground runs. You met every one of them in this module. shape-areas was in lesson 01, and vat-default and sum-any were in lesson 02. Lesson 03 held digital-root, apply-ops and gcd-lcm, and lesson 04 held longest-collatz and fib-calls. hanoi-moves and subset-count were in the CP and Interview Pack.

Checking what this lesson needs for you…

What is inside Problems: Functions

  1. An optional value and a default parameter
  2. A function per job
  3. Recursion and its depth on the judge
  4. Counting rather than running
  5. The edges the hidden tests try