random numbers function

PHOTO EMBED

Thu Apr 29 2021 18:23:18 GMT+0000 (UTC)

Saved by @bilgehanevren #ftp

let arr = []; 
for (let i = 0; i <20; i++) {
    let rand = Math.floor(Math.random() * 10) + 1
    arr[i] = rand;
}
console.log(arr)

let evenNumbersArray = [];
let oddNumbersArray = [];
for (let i of arr) {
    if (value % 2 == 0) {
        evenNumbersArray += value
    } else
     {
         oddNumbersArray += value
     }
}
content_copyCOPY