Something Like that:
Built-in Function Constructors
JS
Array.prototype.myCustomFeature = "Cool!";
var arr = ['John', 'Jane', 'Jim'];
for(var prop in arr){
document.write(prop + ': ' + arr[prop] + '<br>');
}
[codepen_embed height=”265″ theme_id=”0″ slug_hash=”prKRjj” default_tab=”result” user=”pradeepanvi”]See the Pen Arrays and for..in by Pradeep Kumar (@pradeepanvi) on CodePen.[/codepen_embed]
Now you can see
0: John
1: Jane
2: Jim
myCustomFeature: Cool!