Coffee Code Challenge ☕

This page decodes the coffee challenge shown below. Can you crack the code?

Coffee Code Challenge

JavaScript Code

// JavaScript code from the coffee challenge
var your_drink = "latte";

var reverse = function(s) {
    return s.split("").reverse().join("");
}

var barista = {
    str1: "ion",
    str2: reverse("rcne"),
    str3: "ypt",
    request: function(preference) {
        return preference + " Secret word: " + this.str2 + this.str3 + this.str1;
    }
};

console.log(barista.request(your_drink));
            

Explanation

When executed, the code returns: latte Secret word: encryption