What is the use of the fill () method in JavaScript
Editor to share with you what is the use of the fill () method in JavaScript. I hope you will get something after reading this article. Let's discuss it together.
Fill ()
The fill () method is used to replace all elements of the array with static elements.
Var str1 = console.log (str1.fill (1)); / / [1, 1, 1, 1, 1, 1] after reading this article, I believe you have a certain understanding of "what is the use of fill () method in JavaScript". If you want to know more related knowledge, welcome to follow the industry information channel, thank you for reading!