• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 2. The JavaScript Language: Data... > Understanding Operator Precedence

Understanding Operator Precedence

Now that we’ve covered the JavaScript operators, another issue becomes important: How does JavaScript handle multiple operators in the same statement? Take a look at this code, for example:

<HTML> 
    <HEAD> 
        <TITLE> 
            Operator Precedence 
        </TITLE> 
    </HEAD>  
    <BODY> 
        <H1>Working With the Conditional Operator</H1> 
        <SCRIPT LANGUAGE="JavaScript"> 
        <!--
            var result = 5 + 3 * 2
					document.write("5 + 3 * 2 = " + result) 
        // --> 
        </SCRIPT> 
     </BODY> 
</HTML> 


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint