Skip to content

Instantly share code, notes, and snippets.

Introduction to Higher-Order Functions

Lessons

Slides 1

Slides 2

Two Forms of Functions

Slides

  1. Write a function called average that takes an array of numbers as a parameter and returns the average of those numbers.

    After you write your function, you can test it using the above inputs to make sure that it behaves correctly.

  2. Write a function called min that finds the smallest number in an array of numbers.

This lesson has slides and exercises for "Filter", "Reduce", and "Reduce Optional"

Filter

Lesson

Filter Slides

Exercises

Structured Study Program Teaching Mentor Assistant Sample Recording

Thanks for your interest in the Prep Teaching Assistant role for SSP! We're asking all candidates to submit a short video of themselves (screencasting) and live coding and explaining their solution to the following problem. Remember that the target student audience are beginners, many will have only completed Udacity's Intro to JS. As such,assume your audience has an understanding of JS data structures, conditionals, iteration, and functions.

Send your video link, along with a copy of your resume to [email protected] Thanks!

Problem 1: Greet Customers

Write a function called "greetCustomer".

Nesting Exercises

Basic Requirements

Review :

  • Retrieve the value "comeGetMe!" in each of the following data structures. Store them in variable(s)/data structure(s) of your choice.
var arrayA = ["hello", "world", "hack", "reactor", "comeGetMe!", "is", "awesome"];
var arrayB = [true, false, 100, 200, "comeGetMe!", "Batman", "Robin",];