Page 5 - JavaScript
P. 5

Getting maximum and minimum from an array:                                                          41
            Restrict Number to Min/Max Range                                                                  42

            Getting roots of a number                                                                         42

          Square Root                                                                                         42

          Cube Root                                                                                           42

          Finding nth-roots                                                                                   42


        Chapter 6: Arrays                                                                                    43

          Syntax                                                                                              43

          Remarks                                                                                             43

          Examples                                                                                            43

            Standard array initialization                                                                     43

            Array spread / rest                                                                               44

            Spread operator                                                                                   44
            Rest operator                                                                                     45

            Mapping values                                                                                    45

            Filtering values                                                                                  46

        Filter falsy values                                                                                  47

        Another simple example                                                                               47


          Iteration                                                                                           47

          A traditional for-loop                                                                              48

          Using a traditional for loop to loop through an array                                               48

          A while loop                                                                                        49

          for...in                                                                                            49

          for...of                                                                                            49

          Array.prototype.keys()                                                                              50

          Array.prototype.forEach()                                                                           50

          Array.prototype.every                                                                               51

          Array.prototype.some                                                                                51

          Libraries                                                                                           52

          Filtering Object Arrays                                                                             52

          Joining array elements in a string                                                                  54
   1   2   3   4   5   6   7   8   9   10