languages = ['CoffeeScript', 'JavaScript', 'Ruby', 'Python']
learn(languages)
Expected Result:
> CoffeeScript is CS
> JavaScript is JS
> Ruby works with Ruby on Rails
> Python works with Django
languages = ['CoffeeScript', 'JavaScript', 'Ruby', 'Python']
learn(languages)
Expected Result:
> CoffeeScript is CS
> JavaScript is JS
> Ruby works with Ruby on Rails
> Python works with Django
languages = ['CoffeeScript', 'JavaScript', 'Ruby', 'Python']
learn = (languages) ->
for l in languages
switch l
when 'CoffeeScript' then console.log "#{l} is CS"
when 'JavaScript' then console.log "#{l} is JS"
when 'Ruby' then console.log "#{l} works with Ruby on Rails"
when 'Python' then console.log "#{l} works with Django"
learn languages