Javascript Country Codes Hackerrank Solution