I've been testing this code and it's not working as I expected. Can someone shed some light on this please ?
language = { JS: "Websites", Python: "Science", Ruby: "Web apps" }
puts "What language would you like to know? "
choice = gets.chomp
case choice
when "js" || "JS"
puts "Websites!"
when "Python" || "python"
puts "Science!"
when "Ruby" || "ruby"
puts "Web apps!"
else
puts "I don't know!"
end
, When I put in the first entry it runs, but if I use the latter entry it prints "I don't Know!"
i.e : if I enter 'js' runs, but If I enter 'JS' it throws 'I don't know!'