Facebook
From Colorant Frog, 5 Years ago, written in JavaScript.
This paste is a reply to Re: Re: Re: Aleksander Tsoy_Find Khronos day from Bitty Duck - view diff
Embed
Download Paste or View Raw
Hits: 236
  1. let arr = [];
  2. function minMax(min, max) {
  3.   let cicles = 8;
  4.   for (let i = 0; i < cicles; i++) {
  5.     let random = Math.floor(Math.random() * (max - min + 1)) + min;
  6.     arr.push(random);
  7.   }
  8. }
  9. minMax(-2, 10);
  10.  
  11. function disp() { // функц вывода, о котор вы писали
  12. console.log(arr);
  13. }
  14. disp(arr)