Object Basics
Here the values push to the object
var arr = []; // Declare the array arr.push('value');
Here the value set into the object
arr[1].name = 'test'; console.log(arr[1].name);
Here the initilize the object
var var ={'id':1,'name':'test'}; console.log(var);
Display the all names from the object
var arr = [{name: 'test1'},{name: 'test2'}]; for(var i=0;i<arr.length;i++){ console.log(arr[i].name+'<br>'); }
You might also like:
Detect AdBlock with JavaScript in my browser30-07-2017 AdBlock javascript detect |
Sample Validations in javascript22-02-2017 validations javascript |
Get random strings from given string In javascript21-02-2017 javascript random string |
Send Mail in Node Js21-02-2017 node js mail npm module |
Get Unique values from array/object in javascript19-02-2017 javascript unique remove repeated values from array |