Skip to content

Instantly share code, notes, and snippets.

View himeshvats19's full-sized avatar

Himesh Vats himeshvats19

View GitHub Profile
$('.btn').click((event) =>{
this.sendData()
})
var _this = this
$('.btn').click(function(event){
_this.sendData()
})
let a = [10,20,30];
let [x, y, z] = a;
console.log(x); //10
console.log(y); //20
console.log(z); //30
var {house, mouse} = $('body').data()
var data = $('body').data(), // data has properties house and mouse
house = data.house,
mouse = data.mouse
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.`
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.'
var name = `Your name is ${first} ${last}.`
var url = `http://localhost:3000/api/messages/${id}`
var name = 'Your name is ' + first + ' ' + last + '.'
var url = 'http://localhost:3000/api/messages/' + id
var name = 'Your name is ' + first + ' ' + last + '.'
var url = 'http://localhost:3000/api/messages/' + id