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
| var JS = { | |
| name: "The Javascript language", | |
| log() { | |
| this.name = "updated Javascript Language"; | |
| console.log(this); | |
| var setName = newName => { | |
| // this points to JS object | |
| this.name = newName; | |
| }; |
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
| var JS = { | |
| name: "The Javascript languaget", | |
| log: function() { | |
| this.name = "updated Javascript Language"; | |
| console.log(this); | |
| var setName = function(newName) { | |
| // this points to global object | |
| this.name = newName; | |
| }; |
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
| var profile = { | |
| firstName: "Tamim", | |
| lastName: "Iqbal", | |
| fullName() { | |
| return `${this.firstName} ${this.lastName}`; | |
| } | |
| }; | |
| console.log(profile.fullName()); |
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
| var profile = { | |
| firstName: "Tamim", | |
| lastName: "Iqbal", | |
| fullName: () => { | |
| return `${this.firstName} ${this.lastName}`; | |
| } | |
| }; | |
| console.log(profile.fullName()); |
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
| const footballLeagues = [ | |
| { type: "english_premier_league", total_goal: 341, target: "English-player" }, | |
| { type: "english_premier", total_goal: 341, target: "English-player" }, | |
| { type: "bundesliga", total_goal: 341, target: "German-player" }, | |
| { type: "english_premier_league", total_goal: 341, target: "English-player" }, | |
| { type: "la_liga", total_goal: 411, target: "Spanish_player" }, | |
| { type: "la_liga", total_goal: 101, target: "Argentain_player" } | |
| ]; | |
| const la_ligaDetail = footballLeagues |
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
| const footballLeagues = [ | |
| { type: "english_premier_league", total_goal: 341, target: "English-player" }, | |
| { type: "english_premier", total_goal: 341, target: "English-player" }, | |
| { type: "bundesliga", total_goal: 341, target: "German-player" }, | |
| { type: "english_premier_league", total_goal: 341, target: "English-player" }, | |
| { type: "la_liga", total_goal: 411, target: "Spanish_player" }, | |
| { type: "la_liga", total_goal: 101, target: "Argentain_player" } | |
| ]; | |
| const la_ligaDetail = footballLeagues |
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
| const ages = [19, 4, 32, 18, 17, 12, 9, 14, 15]; | |
| const old = ages.filter(age => age >= 18); | |
| console.log(old); |
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
| const ages = [19, 4, 32, 18, 17, 12, 9, 14, 15]; | |
| const old = ages.filter(age => { | |
| return age >= 18; | |
| }); | |
| console.log(old); |
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
| const names = ["sakib", "tamim", "Riad"]; | |
| const fullNames = names.map(name => { | |
| return `${name}`; | |
| }); | |
| console.log(fullNames); |
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
| const names = ["sakib", "tamim", "Riad"]; | |
| const fullNames = names.map(function(name) { | |
| return `${name}`; | |
| }); | |
| console.log(fullNames); |
NewerOlder