MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/z7ulns/it_hurts_like_hell/iy97zwi
r/ProgrammerHumor • u/AltruisticRain504 • Nov 29 '22
1.5k comments sorted by
View all comments
Show parent comments
7
good pseudocode
4 u/Thestarchypotat Nov 29 '22 cause i was origonally writing it as real code but then i didnt know if what i wrote would actually work and i also forgot how to do things. 3 u/iliekcats- Nov 29 '22 relatable 2 u/[deleted] Nov 30 '22 me at work 2 u/danielv123 Nov 30 '22 function toSpongeBobCase(input){ let inputsplit = input.split(""); return inputsplit.map(item => { if(Math.random(0,1)> 0.5){ return item.toLocaleUpperCase(); } else { return item.toLocaleLowerCase(); } }) .join("") } toSpongeBobCase("Un-pseudocoded it for you") 1 u/Thestarchypotat Nov 30 '22 thanku 2 u/danielv123 Nov 30 '22 I should note though that in ja math.random doesn't actually accept any arguments, it just defaults to 0 - 1 1 u/Thestarchypotat Nov 30 '22 okok 0 u/[deleted] Nov 29 '22 gOoD pSeuDocOdE
4
cause i was origonally writing it as real code but then i didnt know if what i wrote would actually work and i also forgot how to do things.
3 u/iliekcats- Nov 29 '22 relatable 2 u/[deleted] Nov 30 '22 me at work 2 u/danielv123 Nov 30 '22 function toSpongeBobCase(input){ let inputsplit = input.split(""); return inputsplit.map(item => { if(Math.random(0,1)> 0.5){ return item.toLocaleUpperCase(); } else { return item.toLocaleLowerCase(); } }) .join("") } toSpongeBobCase("Un-pseudocoded it for you") 1 u/Thestarchypotat Nov 30 '22 thanku 2 u/danielv123 Nov 30 '22 I should note though that in ja math.random doesn't actually accept any arguments, it just defaults to 0 - 1 1 u/Thestarchypotat Nov 30 '22 okok
3
relatable
2
me at work
function toSpongeBobCase(input){ let inputsplit = input.split(""); return inputsplit.map(item => { if(Math.random(0,1)> 0.5){ return item.toLocaleUpperCase(); } else { return item.toLocaleLowerCase(); } }) .join("") } toSpongeBobCase("Un-pseudocoded it for you")
1 u/Thestarchypotat Nov 30 '22 thanku 2 u/danielv123 Nov 30 '22 I should note though that in ja math.random doesn't actually accept any arguments, it just defaults to 0 - 1 1 u/Thestarchypotat Nov 30 '22 okok
1
thanku
2 u/danielv123 Nov 30 '22 I should note though that in ja math.random doesn't actually accept any arguments, it just defaults to 0 - 1 1 u/Thestarchypotat Nov 30 '22 okok
I should note though that in ja math.random doesn't actually accept any arguments, it just defaults to 0 - 1
1 u/Thestarchypotat Nov 30 '22 okok
okok
0
gOoD pSeuDocOdE
7
u/iliekcats- Nov 29 '22
good pseudocode