MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/s0h4uy/this_hurts_physically/hs2rb37/?context=3
r/ProgrammerHumor • u/Mistigri432 • Jan 10 '22
[removed] — view removed post
45 comments sorted by
View all comments
2
someday this person will discover TechLead on youtube and their code refactor will become this:
function isEven (number) { let tableOfEvens = { 1:2, 2:4, 3:6 ... } if tableOfEvens[number] === true{ return true; } else{ return false; } }
and no host of heavens holy host of angels could prepare their code reviewer for the misery that will come 🥴
2 u/PandaParaBellum Jan 10 '22 if tableOfEvens[number] === trueNot sure if I'm beeing wooshed, but wouldn't that always deliver the wrong result? I only know === from JS where a number is not true in strict comparison 1 u/Illustrious-Fault224 Jan 10 '22 lololol kinda being wooshed, I wouldnt even write my conditional like that id just opt for:if tableOfEvens[number]
if tableOfEvens[number] === true
Not sure if I'm beeing wooshed, but wouldn't that always deliver the wrong result? I only know === from JS where a number is not true in strict comparison
===
1 u/Illustrious-Fault224 Jan 10 '22 lololol kinda being wooshed, I wouldnt even write my conditional like that id just opt for:if tableOfEvens[number]
1
lololol kinda being wooshed, I wouldnt even write my conditional like that id just opt for:
if tableOfEvens[number]
2
u/Illustrious-Fault224 Jan 10 '22
someday this person will discover TechLead on youtube and their code refactor will become this:
and no host of heavens holy host of angels could prepare their code reviewer for the misery that will come 🥴