| | |
| | | |
| | | import {terminal} from "./dfhi.js"; |
| | | |
| | | window.main = function(...argv) { |
| | | window.main = (...argv) => { |
| | | let sumEvent = 0n; |
| | | let sumOdd = 0n; |
| | | let credit = argv[0]; |
| | |
| | | n = n/10n; |
| | | } |
| | | console.log({sumOdd, sumEvent}); |
| | | let sum =(sumEvent + sumOdd) % 10n; |
| | | const sum =(sumEvent + sumOdd) % 10n; |
| | | if (sum === 0n) { |
| | | terminal.printl(`${credit} maybe OK`); |
| | | terminal.printl(`${credit} may be a valid credit number`); |
| | | } else { |
| | | terminal.printl(`${credit} definitiv Wrong`); |
| | | terminal.printl(`${credit} is not a valid credit number`); |
| | | } |
| | | }; |