Page 15 - JavaScript
P. 15

Factory Functions                                                                                  198
          Factory with Composition                                                                           199


          Abstract Factory Pattern                                                                           200

        Chapter 28: Custom Elements                                                                         202

          Syntax                                                                                             202

          Parameters                                                                                         202

          Remarks                                                                                            202

          Examples                                                                                           202

            Registering New Elements                                                                         202

            Extending Native Elements                                                                        203

        Chapter 29: Data attributes                                                                         204

          Syntax                                                                                             204

          Remarks                                                                                            204

          Examples                                                                                           204

            Accessing data attributes                                                                        204

        Chapter 30: Data Manipulation                                                                       206

          Examples                                                                                           206


            Extract extension from file name                                                                 206
            Format numbers as money                                                                          206

            Set object property given its string name                                                        207

        Chapter 31: Datatypes in Javascript                                                                 208

          Examples                                                                                           208

            typeof                                                                                           208

            Getting object type by constructor name                                                          209

            Finding an object's class                                                                        210

        Chapter 32: Date                                                                                    212

          Syntax                                                                                             212

          Parameters                                                                                         212

          Examples                                                                                           212

            Get the current time and date                                                                    212

        Get the current year                                                                                213
   10   11   12   13   14   15   16   17   18   19   20