Creative Opportunities in Coding
101 Ways to Say ‘Hello World’
function alphabet(stop = false, uppercase = false)
{
this.counter = typeof this.counter !==
"number" ? 0 : this.counter + 1;
const letter = new Array(26).fill().map((value,
index, array) => {
return uppercase
? String.fromCharCode(97 +
index).toUpperCase()
: String.fromCharCode(97 + index);
})[this.counter];
if (stop) this.counter = -1;
return stop ? letter : alphabet;
}
let helloWorld = [
alphabet()()()()()()()(true, true),
alphabet()()()()(true),
alphabet()()()()()()()()()()()(true),
alphabet()()()()()()()()()()()(true),
alphabet()()()()()()()()()()()()()()(true),
", ",
alphabet()()()()()()()()()()()()()()()()()()()()
()()(true, true),
alphabet()()()()()()()()()()()()()()(true),
alphabet()()()()()()()()()()()()()()()()()
(true),
alphabet()()()()()()()()()()()(true),
alphabet()()()(true)
];
console.log(helloWorld.join(“”);