This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Declare a JavaScript complex object | |
| const user = { | |
| name: 'Subrata Sarkar', | |
| age: 47, | |
| gender: 'Male', | |
| location: { | |
| address: { | |
| aptno: 'D3', | |
| bldg: 'City Heights - Phase 9', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| A simple example of default parameter handling inside a JavaScript class which uses a constructor | |
| */ | |
| class paramValueExample { | |
| constructor(x, y) { | |
| this.x = 25; | |
| this.y = 50; | |
| this.fruits = ['banana', 'apple', 'grapes']; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Default parameter syntax in ES6 | |
| // Until ES5 we were not able to declare a default value to function paramters | |
| // ES6 gives us the liberty to do that | |
| // Parameters value type has no restriction, it could either be an Integer or a String or an Array or even a JavaScript object | |
| // ************************************************* | |
| // THE ES5 WAY: Let's see how we use to do it in ES5 | |
| // *************************************************/ | |
| var objAboutPerson = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script> | |
| function sum(x, y) { | |
| /** | |
| Using the conventional plus (+) opertior | |
| for concatenating strings. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link href="../core-scaffold/core-scaffold.html" rel="import"> | |
| <link href="../core-header-panel/core-header-panel.html" rel="import"> | |
| <link href="../core-menu/core-menu.html" rel="import"> | |
| <link href="../core-item/core-item.html" rel="import"> | |
| <link href="../core-icon-button/core-icon-button.html" rel="import"> | |
| <link href="../core-toolbar/core-toolbar.html" rel="import"> | |
| <link href="../core-menu/core-submenu.html" rel="import"> | |
| <link href="../google-map/google-map.html" rel="import"> | |
| <polymer-element name="my-element"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link href="../core-scaffold/core-scaffold.html" rel="import"> | |
| <link href="../core-header-panel/core-header-panel.html" rel="import"> | |
| <link href="../core-menu/core-menu.html" rel="import"> | |
| <link href="../core-item/core-item.html" rel="import"> | |
| <link href="../core-icon-button/core-icon-button.html" rel="import"> | |
| <link href="../core-toolbar/core-toolbar.html" rel="import"> | |
| <link href="../core-input/core-input.html" rel="import"> | |
| <link href="../core-menu/core-submenu.html" rel="import"> | |
| <link href="../google-map/google-map.html" rel="import"> | |
| <link href="../google-map/google-map-search.html" rel="import"> |
NewerOlder