Test Your Knowledge: Questions

Question 15-1

How are Boolean values handled differently by PHP and JavaScript?

Question 15-2

What character is used to define a JavaScript variable name?

Question 15-3

What is the difference between unary, binary, and ternary operators?

Question 15-4

What is the best way to force your own operator precedence?

Question 15-5

When would you use the === (identity) operator?

Question 15-6

What are the simplest two forms of expressions?

Question 15-7

Name the three conditional statement types.

Question 15-8

How do if and while statements interpret conditional expressions of different data types?

Question 15-9

Why is a for loop more powerful than a while loop?

Question 15-10

What is the purpose of the with statement?

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

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