The ". Secret word:" is "ornamentalsmith"
Printable View
The ". Secret word:" is "ornamentalsmith"
Thanks for the diversion. But...you introduced the syntax of "ThisstrX" which threw me, until I treated it as StrX and got: Ornamental Smith!
Cheers,
Data
ornamental smith
Prize_crystal. Secret word: ornamentalsmith
Prize_Crystal. Secret word: ornamentalsmith Thanks :)
Secret word: Ornamentalsmith
Secret word: ornamentalsmith
it returns "ornamentalsmith"
As written, I think this returns nothing. No periods between "this" and "strX" in that return statement.
If we clean up the code to make it work (as written):
Then the result would be:Code:// If you can read this code, tell your Community Manager the secret word and win a small prize.
var Prize_Crystals;
var reverse = function(s) {
return s.split("").reverse( ).join("");
};
var communitymanager = {
Str1: "al",
Str2: reverse("hti"),
Str3: reverse("tne"),
Str4: reverse("nro"),
Str5: "am",
Str6: reverse("ms"),
request: function(preference) {
return preference + ". Secret word: " +
this.Str4+this.Str5+this.Str3+this.Str1+this.Str6+this.Str2;
}
};
communitymanager.request (Prize_Crystals);
undefined. Secret word: ornamentalsmith