| 8 | include(inc, contents, 'cell', random(4, 1) + random(3, 2) + ' ' + random(4, 1) + random(3, 2) + '-' + random(3, 4)); |
| 9 | include(inc, contents, 'id', () => { |
| 10 | const checkSIN = (sin) => { |
| 11 | const check = '121212121'; |
| 12 | const result = sin |
| 13 | .split('') |
| 14 | .map((num, index) => { |
| 15 | let res = num * check[index]; |
| 16 | if (res >= 10) { |
| 17 | res = String(res).split('').reduce((a,b) => +a + +b); |
| 18 | } |
| 19 | return res |
| 20 | }) |
| 21 | .reduce((a, b) => a + b); |
| 22 | |
| 23 | return result % 10 === 0; |
| 24 | }; |
| 25 | const genSIN = () => { |
| 26 | let sin = random(3, 9); |
| 27 | while(!checkSIN(sin)){ |