DS
Size: a a a
DS
В
j
Кm
В
j
НС
НС
DS
{
const p = [1, 4, -2, 3]
const getK = () => 3
const multi = (k) => p.map(num => num * k)
const divide = (k) => p.map(num => num / k)
const show = (x) => console.log(x)
const onMultiply = () => show(multi(getK()))
const onDivide = () => show(divide(getK()))
document.getElementById('mul').addEventListener('click', onMultiply)
document.getElementById('divide').addEventListener('click', onDivide)
}
НС
j
DS
НС
j
DМ
AZ
ei
j
DМ