Test Your Knowledge: Questions

Question 16-1

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

Question 16-2

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

Question 16-3

Name a way to return multiple values from a function.

Question 16-4

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

Question 16-5

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

Question 16-6

What keyword is used to create an object?

Question 16-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?

Question 16-8

How can you create a multidimensional array?

Question 16-9

What syntax is used to create an associative array?

Question 16-10

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

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

Get Learning PHP, MySQL, and JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.