To remind users that it operates by side effect, it does not return the sorted sequence
не совсем понял
const arr = [1,2,3,4,5,6,7,8,9,10];
for (let i = 0; i < arr.length; i++) {
if (arr[i] <= 8) {
arr.splice(i, 1);
}
}
console.log(arr);
не работает почему-то функция removeChild
arg.removeChild(children[i--]);
. Потому что так написано в документации
нашла пример, в котором работает
setTimerActive(!timerActive);
disabled={timerActive ? '1' : '0'}
Boolean('0') // true
- какая неожиданность, правда?