js-code-to-svg-flowchart
js-code-to-svg-flowchart copied to clipboard
Ternay operator
Another bug at this one it does not show the flowchart properly.
let max = min + verseInPage >= dataArr.length ? dataArr.length : min + verseInPage;
I think the error accrued since the result after the condition is the same as the condition second part (dataArr.length)
since it works well if we added zero after the length like the code shown below
let max = min + verseInPage >= dataArr.length ? dataArr.length +0 : min + verseInPage;