Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const getGets = (arr) => {
- let index = 0;
- return () => {
- const toReturn = arr[index];
- index += 1;
- return toReturn;
- };
- };
- // this is the test
- const test = [
- '5'
- ];
- const gets = this.gets || getGets(test);
- const print = this.print || console.log;
- const n = +gets()
- function getArray(n1) {
- for (let index = 0; index < n1; index++) {
- let result = index * 5;
- print(result)
- }
- }
- getArray(n)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement