Page 3 - JavaScript
P. 3

Sending messages                                                                                     12

        Receiving, Validating and Processing Messages                                                        13

        Chapter 3: AJAX                                                                                      15

          Introduction                                                                                        15

          Remarks                                                                                             15

          Examples                                                                                            15

            Using GET and no parameters                                                                       15

            Sending and Receiving JSON Data via POST                                                          15

            Displaying the top JavaScript questions of the month from Stack Overflow's API                    16

            Using GET with parameters                                                                         17

            Check if a file exists via a HEAD request                                                         17

            Add an AJAX preloader                                                                             18

            Listening to AJAX events at a global level                                                        19
        Chapter 4: Anti-patterns                                                                             20


          Examples                                                                                            20

            Chaining assignments in var declarations.                                                         20

        Chapter 5: Arithmetic (Math)                                                                         21

          Remarks                                                                                             21

          Examples                                                                                            21

            Addition (+)                                                                                      21

            Subtraction (-)                                                                                   22

            Multiplication (*)                                                                                22

            Division (/)                                                                                      22
            Remainder / Modulus (%)                                                                           23

            Using modulus to obtain the fractional part of a number                                           24

            Incrementing (++)                                                                                 24

            Decrementing (--)                                                                                 24

        Common Uses                                                                                          25

          Exponentiation (Math.pow() or **)                                                                   25

          Use Math.pow to find the nth root of a number.                                                      26

          Constants                                                                                           26

          Trigonometry                                                                                        27
   1   2   3   4   5   6   7   8