Skip to content
New issue

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

Ternay operator #53

Open
a0m0rajab opened this issue May 29, 2020 · 1 comment
Open

Ternay operator #53

a0m0rajab opened this issue May 29, 2020 · 1 comment

Comments

@a0m0rajab
Copy link

a0m0rajab commented May 29, 2020

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
Copy link
Author

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant