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
function shouter(whatToShout) { | |
return `${whatToShout}`.toUpperCase() + "!!!"; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! | |
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
function textNormalizer(text) { | |
return `${text}`.toLowerCase().trim(); | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! | |
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
function computeArea(width, height) { | |
return width * height; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! | |
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
function celsToFahr(celsTemp) { | |
return celsTemp * 9 / 5 + 32; | |
} | |
function fahrToCels(fahrTemp) { | |
return (fahrTemp - 32) * 5 / 9; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) |
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
function isDivisible(divisee, divisor) { | |
return divisee % divisor === 0 | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
Nothing to see here! | |
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
function main() { | |
try { | |
doAllTheThings(); | |
} | |
catch(e) { | |
console.error(e); | |
reportError(e); | |
} | |
} |
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
/* Repl.it link: https://repl.it/@PeterYoon/Creating-arrays-drill */ | |
function makeList(item1, item2, item3) { | |
return [item1, item2, item3]; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
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
/* https://repl.it/@PeterYoon/Adding-array-items-drills */ | |
function addToList(list, item) { | |
list.push(item); | |
return list; | |
} | |
/* From here down, you are not expected to | |
understand.... for now :) | |
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
/* repl: https://repl.it/@PeterYoon/Accessing-array-items-drill */ | |
/* stackoverflow: https://stackoverflow.com/questions/8238456/how-to-get-value-at-a-specific-index-of-array-in-javascript */ | |
function accessFirstItem(array) { | |
return array[0]; | |
} | |
function accessThirdItem(array) { | |
return array[2]; | |
} |
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
/* repl: https://repl.it/@PeterYoon/Accessing-array-items-drill */ | |
/* stackoverflow: https://stackoverflow.com/questions/8238456/how-to-get-value-at-a-specific-index-of-array-in-javascript */ | |
function accessFirstItem(array) { | |
return array[0]; | |
} | |
function accessThirdItem(array) { | |
return array[2]; | |
} |
OlderNewer