Simple way to populate an array with zero in JavaScript

Asked 2 years ago, Updated 2 years ago, 108 views

I want to fill the array with zero in JavaScript, what should I do?

javascript array

2022-09-22 22:07

1 Answers

Array.apply(null, Array(5)).map(Number.prototype.valueOf,0);


2022-09-22 22:07

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.