daily pastebin goal
0%
SHARE
TWEET

yoana.ask.ver2

a guest Mar 3rd, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const getGets = (arr) => {
  2.     let index = 0;
  3.    
  4.     return () => {
  5.       const toReturn = arr[index];
  6.       index += 1;
  7.       return toReturn;
  8.     };
  9.   };
  10.   // this is the test
  11.   const test = [
  12.     '1234566666666666666666666666666777777778888887',
  13.   ];
  14.    
  15.   const gets = this.gets || getGets(test);
  16.   const print = this.print || console.log;
  17.    //и тук
  18.   const n = gets();
  19.   // тук са корекциите
  20.   const fillArray = (start, end) => [...Array(+bigInt(end).minus(start).add(1).toString())].map((item, index) => bigInt(start).add(index).toString());
  21.    
  22.   const result = fillArray(bigInt(n).add(1), bigInt(n).add(10));  
  23.   print(result.join('\r\n'));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top