Posts by Vinicíus • 16 points
5 posts
-
0
votes1
answer118
viewsA: Make a function that takes a string with numbers and returns the highest and lowest value
Reducing your current code, everything gets easier using split. function maiorEMenor(numbers) { const e_num = numbers.split(" "); let maior = Math.max.apply(null, e_num) let menor =…
-
-1
votes1
answer46
viewsA: Javascript block loop logic
good in the end I myself ended up finding a viable way. const main = async () => { if ( array.length >= index ) { if (index != count) { console.log(index); index++ main(); }else{…
-
0
votes1
answer94
viewsA: Discordjs How do I when finishing an audio it plays another
Basically you have to create a loop that checks how many links there are in your array, and that when finished playing it passes to the next item of array. It would be something like this: let url =…
-
-1
votes1
answer46
viewsQ: Javascript block loop logic
My code has an array with numerous objects, that abjects which are URL’S, with which I loop through this array and make a request for each url of the array. But I need my loop to go through the…
-
0
votes1
answer39
viewsQ: Loop adding repeated values
I have a loop inside a request, which adds an ID in an array, so that on the next repeat it checks if this same ID is no longer added. and if it is already in the array, skip to the next array id.…