Which fix removes the bug?
const arr = [1, 2, 3]; arr.push;
- Use
arr.add(4)instead of push - Change
arr.push;toarr.push(4); - Use
arr += 4to append the value - Remove the semicolon after push
push must be called with parentheses and a value.const arr = [1, 2, 3]; arr.push;
arr.add(4) instead of pusharr.push; to arr.push(4);arr += 4 to append the valuepush must be called with parentheses and a value.