Crash Override
Description:

Every budding hacker needs an alias! The Phantom Phreak
, Acid Burn
, Zero Cool
and Crash Override
are some notable examples from the film Hackers
.
Your task is to create a function that, given a proper first and last name, will return the correct alias.
Notes:
Two objects that return a one word name in response to the first letter of the first name and one for the first letter of the surname are already given. See the examples below for further details.
If the first character of either of the names given to the function is not a letter from
A - Z
, you should return"Your name must start with a letter from A - Z."
Sometimes people might forget to capitalize the first letter of their name so your function should accommodate for these grammatical errors.
Examples
// These two objects are preloaded, you need to use them in your code
var firstName = {A: 'Alpha', B: 'Beta', C: 'Cache' }
var surname = {A: 'Analogue', B: 'Bomb', C: 'Catalyst' }
aliasGen('Larry', 'Brentwood') === 'Logic Bomb'
aliasGen('123abc', 'Petrovic') === 'Your name must start with a letter from A - Z.'
Happy hacking!
Similar Kata:
Stats:
Created | Jul 18, 2016 |
Published | Jul 18, 2016 |
Warriors Trained | 20886 |
Total Skips | 911 |
Total Code Submissions | 49804 |
Total Times Completed | 10022 |
JavaScript Completions | 5579 |
Python Completions | 3809 |
Ruby Completions | 358 |
C# Completions | 541 |
Total Stars | 209 |
% of votes with a positive feedback rating | 85% of 1669 |
Total "Very Satisfied" Votes | 1291 |
Total "Somewhat Satisfied" Votes | 260 |
Total "Not Satisfied" Votes | 118 |