Beginning AngularJS

(WallPaper) #1

ChApter 1 ■ JAvASCrIpt You Need to KNow


Some of these operators may make intuitive sense, others perhaps not. Let’s write a simple program to look at
how they behave. There are a couple of cases in which we will look a bit closer at some of these operators, so I will
omit them in Listing 1-13 and deal with them shortly afterward.


Listing 1-13. Common Operators in Action


<!DOCTYPE html>




JavaScript Primer





Listing 1-13 shows the output of some basic operations. I’ve put the output in comments next to each line of code,
to make it easier to reconcile. You can use Table 1-1 to clarify your understanding of how each produces its respective
output.

Free download pdf