Javascript : list all un ordered value separated by '\n' from 1 to 8490 - Purwana Tekno, Software Engineer
    Media Belajar membuat Software Aplikasi, Website, Game, & Multimedia untuk Pemula...

Post Top Ad

Rabu, 01 Maret 2023

Javascript : list all un ordered value separated by '\n' from 1 to 8490

 aaa


<script>
// Generate an array of all values from 1 to 8490
let values = Array.from({length: 8490}, (_, i) => i + 1);

// Shuffle the array to get an unordered list
values.sort(() => Math.random() - 0.5);

// Print the values separated by a newline character
console.log(values.join('\n'));
</script>

This will print an unordered list of values from 1 to 8490, with each value on a separate line.

Post Top Ad