Bad name, it should be myArr or myArray
It's his Arry okay, don't judge
Use suffix ‘Arr’ or ‘Array’ to remind yourself it is an array variable especially when you reference the variable hundred lines down. You can also pluralize the array variable name as well.
In real code you sh/wouldn't even do generic names like myArray. Should be something more meaningful like "users" or "products". But he's just learning, anything is fine.
array of object that is like this: const myArray = [ { "key":"value" }, { "key 2":"value 2" }, { "key 3":"value 3" }, { "key 4" :"value 4" }, ]
yes in real program we will use meaning name for anything. but since name of my array doesn't related to my problem so i just use random name in here.
Обсуждают сегодня