let arr = []
for (let i = 0; i <= 3; i++) {
setTimeout(() => {
console.log(arr);
arr.push(1)
}, 1000 * i)
;
}
<span id='span'></span>
<script>
var span = document.getElementById('span')
span.innerText = ~~1.6 (будет 1)
</script>