What’s the difference between “{}” and “[]” while declaring a JavaScript array? Normally I declare like
var a=[];
What is the meaning of de
var a = [];
it is use for brackets for an array of simple values. eg.
var name=["a","b","c"] var a={}
is use for value arrays and objects/properties also. eg.
var programmer = { 'name':'special', 'url':'www.google.com'}