0
What is the output of this code? int[ ] arr = {8, 2, 6}; int y=0; foreach (int x in arr) { y+=x/2; } Console.Write(y);
8 odpowiedzi
+ 3
What is the output of this code?
const arr = ['3', '5', '8'];
console.log(
arr.find(x => x == 8).repeat(2)
);
ans : 88
+ 2
88
+ 1
8/2 + 2/2 + 6/2 = 8, no ?
0
8
0
it's 8
0
8/2 + 2/2 + 6/2 = 4+0+3 = 7, so why 8 ? It's a mistake
0
But 2/2 = 1, not 0...
0
88