Javascript Country Code Hackerrank Problem Set 7