I have no experience in Javascript and this has been bugging me for some time. I don't need to bother too much you with why I need it. Here is the problem simplified as possible and later I'll give an example of what I need:
I need to put one arbitrary integer variable (from 0 to 16) into Javascript and I want it to output a stream of 120 number-lists.
Every first member of these small lists is a numeration number, which means that the first number in the first list is always 1, the first number in the second list is always 2 and so on.
After the first number in the list, pairs of numbers should show up. All of these pairs have:
- the pair's first number that is increasing from 0 to 24 for every new list. After this first number of the pair surpasses 24 the whole pair "disappears"
- the pair's second number which stays the same for every new list, but decreases from 7 to 0 for every new pair
This is where the the input variable comes in:
- a new pair appears to the right of the previous pair every time the first member of the previous pair reaches the given input variable
Here is is an example of the output if the input variable is 9
1 0 7
2 1 7
3 2 7
4 3 7
5 4 7
6 5 7
7 6 7
8 7 7
9 8 7
10 9 7 0 6
11 10 7 1 6
12 11 7 2 6
13 12 7 3 6
14 13 7 4 6
15 14 7 5 6
16 15 7 6 6
17 16 7 7 6
18 17 7 8 6
19 18 7 9 6 0 5
20 19 7 10 6 1 5
21 20 7 11 6 2 5
22 21 7 12 6 3 5
23 22 7 13 6 4 5
24 23 7 14 6 5 5
25 24 7 15 6 6 5
26 16 6 7 5
27 17 6 8 5
28 18 6 9 5 0 4
29 19 6 10 5 1 4
30 20 6 11 5 2 4
31 21 6 12 5 3 4
32 22 6 13 5 4 4
33 23 6 14 5 5 4
34 24 6 15 5 6 4
35 16 5 7 4
36 17 5 8 4
37 18 5 9 4 0 3
38 19 5 10 4 1 3
39 20 5 11 4 2 3
40 21 5 12 4 3 3
41 22 5 13 4 4 3
42 23 5 14 4 5 3
43 24 5 15 4 6 3
44 16 4 7 3
45 17 4 8 3
46 18 4 9 3 0 2
47 19 4 10 3 1 2
48 20 4 11 3 2 2
49 21 4 12 3 3 2
50 22 4 13 3 4 2
51 23 4 14 3 5 2
52 24 4 15 3 6 2
53 16 3 7 2
54 17 3 8 2
55 18 3 9 2 0 1
56 19 3 10 2 1 1
57 20 3 11 2 2 1
58 21 3 12 2 3 1
59 22 3 13 2 4 1
60 23 3 14 2 5 1
61 24 3 15 2 6 1
62 16 2 7 1
63 17 2 8 1
64 18 2 9 1 0 0
65 19 2 10 1 1 0
66 20 2 11 1 2 0
67 21 2 12 1 3 0
68 22 2 13 1 4 0
69 23 2 14 1 5 0
70 24 2 15 1 6 0
71 16 1 7 0
72 17 1 8 0
73 18 1 9 0
74 19 1 10 0
75 20 1 11 0
76 21 1 12 0
77 22 1 13 0
78 23 1 14 0
79 24 1 15 0
80 16 0
81 17 0
82 18 0
83 19 0
84 20 0
85 21 0
86 22 0
87 23 0
88 24 0
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120