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
$('.btn').click((event) =>{ | |
this.sendData() | |
}) |
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 _this = this | |
$('.btn').click(function(event){ | |
_this.sendData() | |
}) |
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
let a = [10,20,30]; | |
let [x, y, z] = a; | |
console.log(x); //10 | |
console.log(y); //20 | |
console.log(z); //30 |
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 {house, mouse} = $('body').data() |
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 data = $('body').data(), // data has properties house and mouse | |
house = data.house, | |
mouse = data.mouse |
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 roadPoem = `Then took the other, as just as fair, | |
And having perhaps the better claim | |
Because it was grassy and wanted wear, | |
Though as for that the passing there | |
Had worn them really about the same,` | |
var fourAgreements = `You have the right to be you. | |
You can only be you when you do your best.` |
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 roadPoem = 'Then took the other, as just as fair,\n\t' | |
+ 'And having perhaps the better claim\n\t' | |
+ 'Because it was grassy and wanted wear,\n\t' | |
+ 'Though as for that the passing there\n\t' | |
+ 'Had worn them really about the same,\n\t' | |
var fourAgreements = 'You have the right to be you.\n\ | |
You can only be you when you do your best.' |
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 name = `Your name is ${first} ${last}.` | |
var url = `http://localhost:3000/api/messages/${id}` |
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 name = 'Your name is ' + first + ' ' + last + '.' | |
var url = 'http://localhost:3000/api/messages/' + id |
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 name = 'Your name is ' + first + ' ' + last + '.' | |
var url = 'http://localhost:3000/api/messages/' + id |