We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for i of [1n..28n] ; i is in [1n..28n] // vvv for (let i1 = 1n; i1 <= 28n; ++i1) { const i = i1; } ((s, e) => { let step = e > s ? 1 : -1; return Array.from({ length: Math.abs(e - s) + 1 }, (_, i) => s + i * step); })(1n, 28n).includes(i);
The latter will throw a TypeError at runtime due to the + 1 Math.abs.
+ 1
Math.abs
The text was updated successfully, but these errors were encountered:
Potential translation that works for both bigint and number:
((s, e) => { let step = e > s ? 1 : -1; const makeStep = typeof s == 'bigint' ? (i) => BigInt(step * i) : (i) => step * i; return Array.from({ length: Math.abs(Number(e - s)) + 1 }, (_, i) => s + makeStep(i)); })
Sorry, something went wrong.
No branches or pull requests
The latter will throw a TypeError at runtime due to the
+ 1
Math.abs
.The text was updated successfully, but these errors were encountered: