Appendix A. Answer key to exercises

This appendix shows the answers and explanations for the exercises that have appeared throughout the book. In many cases, there is more than one way to solve a problem. Therefore, unless the question specified a particular way to solve the problem, any working implementation is acceptable. It’s also expected that your function names could differ from the ones in this appendix.

Chapter 1

  1. False. Although JavaScript is indeed defined by a standards body, ECMA International, it is not supported on all web browsers. And the support that does exist varies (sometimes widely) among browsers.

  2. False. There are many reasons why a visitor to your website might have JavaScript disabled. The browser they’re using might ...

Get JavaScript Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.