finished chapter 4 of elopquent javascrit