Get Planet Name By ID1 [CodeWars] 8kyu#3 - Get Planet Name By ID [CodeWars] 8kyu#3 - Get Planet Name By ID ■ Description:The function is not returning the correct values. Can you figure out why? getPlanetName(3); // should return 'Earth' ■ 문제1234567891011121314151617181920212223function getPlanetName(id){ var name; switch(id){ case 1: name = 'Mercury' case 2: name = 'Venus' case 3: name = 'Earth' case 4: name = 'Mars' case 5: name = 'Jupiter' case 6: name = '.. 2016. 5. 28. 이전 1 다음