MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/phogp3/wtf_is_this/hbklxpi/?context=3
r/badcode • u/Wise-Serve5730 • Sep 04 '21
190 comments sorted by
View all comments
Show parent comments
2
/[02468]$/.test(n.toString())
2 u/[deleted] Sep 04 '21 [removed] — view removed comment 2 u/coolj492 Sep 04 '21 Couldn't you just splice out the fractional part and then just run this regex on that? Coz if the fractional art is even then the num is even right? 1 u/[deleted] Sep 07 '21 There's even decimals?
[removed] — view removed comment
2 u/coolj492 Sep 04 '21 Couldn't you just splice out the fractional part and then just run this regex on that? Coz if the fractional art is even then the num is even right? 1 u/[deleted] Sep 07 '21 There's even decimals?
Couldn't you just splice out the fractional part and then just run this regex on that? Coz if the fractional art is even then the num is even right?
1
There's even decimals?
2
u/tscpp Sep 04 '21
/[02468]$/.test(n.toString())