Page 13 - JavaScript
P. 13

Introduction                                                                                       162
          Syntax                                                                                             162


          Remarks                                                                                            163

          Examples                                                                                           163

            If / Else If / Else Control                                                                      163
            Switch statement                                                                                 164


        Multiple Inclusive Criteria for Cases                                                               166

          Ternary operators                                                                                  166

          Strategy                                                                                           168

          Using || and && short circuiting                                                                   169

        Chapter 23: Console                                                                                 170

          Introduction                                                                                       170

          Syntax                                                                                             170

          Parameters                                                                                         170

          Remarks                                                                                            170

        Opening the Console                                                                                 171


        Chrome                                                                                              171

        Firefox                                                                                             171

        Edge and Internet Explorer                                                                          172

        Safari                                                                                              172


        Opera                                                                                               173

        Compatibility                                                                                       173

          Examples                                                                                           174

            Tabulating values - console.table()                                                              174

            Including a stack trace when logging - console.trace()                                           175

            Printing to a browser's debugging console                                                        176

        Other print methods                                                                                 177

          Measuring time - console.time()                                                                    178

          Counting - console.count()                                                                         179

        Empty string or absence of argument                                                                 181

          Debugging with assertions - console.assert()                                                       181
   8   9   10   11   12   13   14   15   16   17   18