Test Your Knowledge

  1. Are JavaScript functions and variable names case-sensitive or case-insensitive?

  2. How can you write a function that accepts and processes an unlimited number of parameters?

  3. Name a way to return multiple values from a function.

  4. When defining a class, what keyword is used to refer to the current object?

  5. Do all the methods of a class have to be defined within the class definition?

  6. What keyword is used to create an object?

  7. How can a property or method be made available to all objects in a class without replicating the property or method within the object?

  8. How can you create a multidimensional array?

  9. What syntax is used to create an associative array?

  10. Write a statement to sort an array of numbers in descending numerical order.

See Chapter 15 Answers in Appendix A for the answers to these questions.

Get Learning PHP, MySQL, JavaScript, and CSS, 2nd Edition 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.