Created
April 19, 2023 08:16
-
-
Save Eatkin/5ce14427172dc81640dede821d81eb46 to your computer and use it in GitHub Desktop.
A raelly 🅱️ ad implementation of "hello world"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const greet = function() { | |
let greeting = "h"; | |
greeting += "e".repeat(2); | |
greeting = greeting.slice(0, 2); | |
greeting += "l".repeat(5 + Math.ceil(Math.random() * 10)); | |
while (greeting !== "hell") | |
greeting = greeting.slice(0, -1); | |
greeting += "o"; | |
for (let i = 0; i < 7; i++) | |
greeting += " ".repeat(100 + Math.floor(Math.random() * 10)); | |
// Whoops added too many spaces | |
greeting = greeting.trim(); | |
greeting += " "; | |
let world = ["w", "o", "r", "l", "d"]; | |
greeting += world.reduce((flibbertigibbet, snollygoster) => flibbertigibbet + snollygoster) | |
greeting += String.fromCharCode(33); | |
return greeting; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment