r/ProgrammerHumor • • May 20 '22

Meme Found Reddit video player source code

Post image
42k Upvotes

533 comments sorted by

View all comments

Show parent comment

1

u/YouTube-r May 21 '22

Actually i think this is better

const VideoHandler = (): void -> { if (Video.IsInteresting()) { RedditVideoPlayer.Play(); } else if(Math.random() > 0.5) { RedditVideoPlayer.Play(); } else if(Math.random() < 0.5) { RedditVideoPlayer.Play(); } else if(true) { RedditVideoPlayer.Play(); } else if(!RedditVideoPlayer.isPlaying) { RedditVideoPlayer.Play(); } else if(RedditVideoPlayer.isPlaying) { RedditVideoPlayer.Play(); } else if(true) { RedditVideoPlayer.Play(); } else if(false) { RedditVideoPlayer.Play(); } };