js-code-to-svg-flowchart icon indicating copy to clipboard operation
js-code-to-svg-flowchart copied to clipboard

Ternay operator

Open a0m0rajab opened this issue 4 years ago • 1 comments

Another bug at this one it does not show the flowchart properly.

let max = min + verseInPage >= dataArr.length ? dataArr.length : min + verseInPage; test js

a0m0rajab avatar May 29 '20 09:05 a0m0rajab

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;

a0m0rajab avatar May 29 '20 10:05 a0m0rajab