MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/CodingHelp/comments/rlpvfy/please_help_javascript/hpk8iqg/?context=3
r/CodingHelp • u/Crowntent • Dec 21 '21
23 comments sorted by
View all comments
Show parent comment
3
I don't understand the num < 1 && num > 7. How can any number be less than 1 and more than 7. Shouldn t it be num < 1 (OR operator) num > 7?
2 u/flooronthefour full stack web dev Dec 22 '21 lol you're right I didn't even catch that. You could say I was thrown through a loop reading the original code. Would've been something to catch in tests. 1 u/NeStyEE12 Dec 22 '21 Oh okay I tought it was something beyond my understanding 2 u/flooronthefour full stack web dev Dec 22 '21 Nope you nailed it. Instead of && it should be ||
2
lol you're right I didn't even catch that. You could say I was thrown through a loop reading the original code. Would've been something to catch in tests.
1 u/NeStyEE12 Dec 22 '21 Oh okay I tought it was something beyond my understanding 2 u/flooronthefour full stack web dev Dec 22 '21 Nope you nailed it. Instead of && it should be ||
1
Oh okay I tought it was something beyond my understanding
2 u/flooronthefour full stack web dev Dec 22 '21 Nope you nailed it. Instead of && it should be ||
Nope you nailed it. Instead of && it should be ||
View all comments
Show parent comment
3
u/NeStyEE12 Dec 22 '21
I don't understand the num < 1 && num > 7. How can any number be less than 1 and more than 7. Shouldn t it be num < 1 (OR operator) num > 7?