DEV Community

Discussion on: 10 tips from A 10 years experienced Developer

Collapse
 
bravemaster619 profile image
bravemaster619 • Edited

Seriously, how do we check if the given number is odd or even? I don't think the approach in OP is well-designed.

Collapse
 
programmerthings profile image
Programmer Things • Edited

If you're genuinely asking for the solution then below is a simple implementation

Alt Text

Collapse
 
bravemaster619 profile image
bravemaster619

Wow, thanks for the nice solution!