Homework 2
Do the
following JavaScript exercises in the Eloquent JavaScript online book (http://eloquentjavascript.net/index.html).
Please read the chapters carefully before you attempt the
exercises. The answers are available for
these exercises, but, as the book suggests, try really hard until you get a
mild headache and can’t get it to work, before you look at the answers. I want you to turn in your best version of
the code (even if the code does not work) and not the answers given in the
book. You can turn in the JavaScript
files. You can look at the answers
understand them and change your implementation based on pointers from the
answer as this will help you learn, but don’t just copy the exact book answers
and turn them in. If you turn in the
exact book answers for most of the questions (coming up with the exact book
answers is a highly unlikely event if you attempted them by yourself) your
grade will be penalized and you will get zeros for the exact book answers.
Chapter 2
Exercise 2.1 – Looping a triangle
Exercise 2.2 – FizzBuzz
Exercise 2.3 - Chessboard
Chapter 3
Exercise 3.1 – Minimum
Exercise 3.2 – Recursion (Optional.
Extra credit)
Exercise 3.3 – Bean Counting
Chapter 4
Exercise 4.2 – Reversing an array
Exercise 4.3 – A list
Chapter 5
Exercise 5.1 – Flattening
Exercise 5.3 – Everything
Get Free Quote!
379 Experts Online