Posts by Saul44 • 99 points
4 posts
-
2
votes1
answer29
viewsQ: Undefined value in last iteration to traverse nested array
I made the following code with the intention of traversing the following array: [[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]] Everything is happening as I wanted, all…
-
0
votes0
answers23
viewsQ: Value of n in Malba Tahan Chess algorithm
I am in doubt about the value of n in the code, in the "for" below 1 is assigned to the value of n, so it would not be for the first iteration the value of n to be 2? #include <stdio.h> int…
-
4
votes3
answers1553
viewsQ: Return the index of the largest element in an array
I’m trying to return the higher index of the vector, I made the following code but returns undefined in function: let array = [2, 3, 6, 7, 10, 1]; function retornaMaiorIndice(){ for (let i = 0; i…
-
-2
votes1
answer805
viewsQ: Basic Javascript - how to remove a comma from the string
I have a question that is consuming me here concerning this little piece of code: let word = "APPLE" //CONVERTED TO ARRAY let res = word.slice(3,5) //RES = LE let res1 = res.split("") //REVERSE THE…