Created
June 17, 2020 20:06
-
-
Save speckworks/8fce75ccf1307e5010a8a5faca7d30ee to your computer and use it in GitHub Desktop.
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
let your_drink = "coffee"; | |
const reverse = (s) => { | |
return s.split("").reverse().join(""); | |
} | |
const barista = { | |
str1: "ion", | |
str2: reverse("rcne"), | |
str3: "ypt", | |
request: function(preference){ | |
return preference + "secret word:" | |
+this.str2 + this.str3 + this.str1; | |
} | |
} | |
barista.request(your_drink); | |
//outputs: coffee secret word:encryption |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment