Skip to content

Instantly share code, notes, and snippets.

View preimpression's full-sized avatar
💀
ay, there's the rub

Uri preimpression

💀
ay, there's the rub
View GitHub Profile
@hacktember
hacktember / inception.js
Created November 27, 2018 04:38
Function Inception
function suffix(word) {
return word + "ly";
}
function prefix(word) {
return "in" + word;
}
function pejorative(word) {
return prefix(suffix(word));
@hacktember
hacktember / pigdog.js
Created November 27, 2018 04:28
Example function in JavaScript
function mergeTwoNamesIntoOneWithoutSpaces(speciesOne, speciesTwo) {
// speciesOne and speciesTwo are variables; by defining what happens to the
// variables in a function, it lets us transform anything (of a compatible data type)
// that we pass into the function
// whatever we "return" is what the function spits out
return speciesOne + speciesTwo;
}