I need to create a function that checks all numbers in an array and print them out. My idea was something similar to this:
var array = [15,22,88,65,79,19,93,15,90,38,77,10,22,90,99];
var string = "";
var len = array.length;
After declaring the variables, i start to loop them:
for (var i = 0; i < len; i ++) {
for (var j = 0; j < len; j ++) {
//console.log(array[i], array[j]);
}
}
Console prints me value in this order:
3 3
3 6
3 67
. .
6 3
6 6
6 67
. .
I thought to create a if statement checking if array[i] is equal to array[j] then pushing the content in a new string.