this.push javascript code example
Example 1: push javascript
let fruit = ['apple', 'banana']
fruit.push('cherry')
console.log(fruit)
Example 2: how to append object in array javascript
var select =[2,5,8];
var filerdata=[];
for (var i = 0; i < select.length; i++) {
filerdata.push(this.state.data.find((record) => record.id == select[i]));
}
Example 3: push.js
Push.create("Hello world!", {
body: "How's it hangin'?",
icon: '/icon.png',
timeout: 4000,
onClick: function () {
window.focus();
this.close();
}
});