liznomura / chirp-chirp

Recursion (part 2) exercises

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Recursion Exercise

Chirp

Getting started

Notes

  • Define a function named chirp() that takes a single argument 'n'
  • Calling chirp(3) will return the text "chirp chirp chirp"
  • chirp will call itself, each time returning "chirp "

Letter counter

Getting started

Notes

  • Define a function named countLetters() that takes two arguments 'counter' and 'text'
  • Calling countLetters(counter, sample_text) will populate the counter object with a count of how many times letters occur
  • countLetters will call itself until all letters are counted

About

Recursion (part 2) exercises


Languages

Language:JavaScript 94.3%Language:CSS 4.6%Language:HTML 1.1%