You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't exactly what is happening, but the output while i use the code runner is showing spaced arrays when i apply methods like .pop(), .shift(), .push() and similar.
The code itself:
let arr = [1,3,5,7,9]
let teste = arr.push(14,13,false,[])
let ultimoitem = arr.pop()
console.log(ultimoitem)
console.log(arr)
let primeiroItem = arr.shift()
console.log(primeiroItem)
console.log(arr)
teste = arr.unshift(4,5,6)
console.log(teste)
let arr2 = arr.slice(2,5)
console.log(arr2)
console.log(arr)
let arr3 = arr.splice(2,5)
console.log(arr)
console.log(arr3)
Type: Bug
I don't exactly what is happening, but the output while i use the code runner is showing spaced arrays when i apply methods like .pop(), .shift(), .push() and similar.
The code itself:
let arr = [1,3,5,7,9]
let teste = arr.push(14,13,false,[])
let ultimoitem = arr.pop()
console.log(ultimoitem)
console.log(arr)
let primeiroItem = arr.shift()
console.log(primeiroItem)
console.log(arr)
teste = arr.unshift(4,5,6)
console.log(teste)
let arr2 = arr.slice(2,5)
console.log(arr2)
console.log(arr)
let arr3 = arr.splice(2,5)
console.log(arr)
console.log(arr3)
The output:
[]
[
1, 3, 5,
7, 9, 14,
13, false
]
1
[
3, 5, 7,
9, 14, 13,
false
]
10
[ 6, 3, 5 ]
[
4, 5, 6,
3, 5, 7,
9, 14, 13,
false
]
[ 4, 5, 14, 13, false ]
[ 6, 3, 5, 7, 9 ]
Note: I'm using the plug in "Code runner ".
Extension version: 0.12.2
VS Code version: Code 1.93.1 (38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40, 2024-09-11T17:20:05.685Z)
OS version: Windows_NT x64 10.0.19045
Modes:
The text was updated successfully, but these errors were encountered: