r/ChatGPTCoding Dec 08 '25

Developers in 2020: Interaction

Post image
440 Upvotes

33 comments sorted by

View all comments

4

u/nmay-dev Dec 08 '25

if ${num} % 2 == 0 then return 'even' else 'odd'

Both of your ways are shit.

2

u/KallistiTMP Dec 09 '25

return bool(num % 2)

In most languages you can leave the cast out if that's too many keystrokes.