Yngvarr

Generation

generate functionThu, 01 Dec 2022

наполнить объект в цикле

function fill(obj, value) { for (var i = 0; i < obj.length; i++) obj[i] = value; } var a = [1,2,3] fill(a, 1)

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant