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
Choosing svg as the output format results in double spaces
Comparison
PS I used the web version, havent tried sending a POST request
Edited (1 Oct 2023): Not reproducible anymore :/
My code at the time
function pascalsTriangle(size) { const result = [[1]]; for (let i = 0; i < size; i++) { const row = []; for (let j = 0; j <= i + 1; j++) { row.push((result[i][j] ?? 0) + (result[i][j - 1] ?? 0)); } result.push(row); } return result; } function formatTriangle(triangle) { const SPACE = ' '; const size = triangle.length; for (let rowIndex = 0; rowIndex < size; rowIndex++) { let row = ''; const leftPadding = size - rowIndex; row += SPACE.repeat(leftPadding); row += triangle[rowIndex].map(num => num.toString().padStart(SPACE.length * 2)).join(''); console.log(row); } } formatTriangle(pascalsTriangle(10));
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Choosing svg as the output format results in double spaces
Comparison
PS I used the web version, havent tried sending a POST request
Edited (1 Oct 2023):
Not reproducible anymore :/
My code at the time
The text was updated successfully, but these errors were encountered: