Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @/(@NT)
- const persons = Array(5).fill({});
- persons[0].name = 'uday';
- const persons = Array(5).fill(null).map(() => ({}));
- const persons = Array.from({length:5},()=> ({}));
- const persons = [...new Array(5)].map(()=> ({}));
Advertisement
Add Comment
Please, Sign In to add comment