8 kyu
Sleigh Authentication
8,664 of 22,994BattleRattle
Description:
Christmas is coming and many people dreamed of having a ride with Santa's sleigh. But, of course, only Santa himself is allowed to use this wonderful transportation. And in order to make sure, that only he can board the sleigh, there's an authentication mechanism.
Your task is to implement the authenticate()
method of the sleigh, which takes the name of the person, who wants to board the sleigh and a secret password. If, and only if, the name equals "Santa Claus" and the password is "Ho Ho Ho!" (yes, even Santa has a secret password with uppercase and lowercase letters and special characters :D), the return value must be true
. Otherwise it should return false
.
Examples:
var sleigh = new Sleigh();
sleigh.authenticate("Santa Claus", "Ho Ho Ho!"); // must return TRUE
sleigh.authenticate("Santa", "Ho Ho Ho!"); // must return FALSE
sleigh.authenticate("Santa Claus", "Ho Ho!"); // must return FALSE
sleigh.authenticate("jhoffner", "CodeWars"); // Nope, even Jake is not allowed to use the sleigh ;)
Fundamentals
Stats:
Created | Dec 15, 2013 |
Published | Dec 15, 2013 |
Warriors Trained | 26821 |
Total Skips | 1386 |
Total Code Submissions | 36743 |
Total Times Completed | 22994 |
JavaScript Completions | 8664 |
CoffeeScript Completions | 280 |
Ruby Completions | 3102 |
Python Completions | 7784 |
Haskell Completions | 503 |
Elixir Completions | 315 |
C# Completions | 971 |
Java Completions | 2240 |
Total Stars | 137 |
% of votes with a positive feedback rating | 88% of 2161 |
Total "Very Satisfied" Votes | 1722 |
Total "Somewhat Satisfied" Votes | 357 |
Total "Not Satisfied" Votes | 82 |