Back
Close

Ruby Introduction (Dutch)

PeterDR
29.4K views

Quiz

Laten we een proef op de som nemen met je tot nu toe opgedane kennis met de volgende vragen.

iphone_x_stock = 10

if iphone_x_stock > 0
  puts "De Apple iPhone X is op voorraad"
end
iphone_x_stock = 0

if iphone_x_stock > 0
  puts "De Apple iPhone X is op voorraad"
else
  puts "Helaas! De Apple iPhone X is tijdelijk uitverkocht"
end
iphone_x_stock = 0
samsung_s9_stock = 5

if iphone_x_stock > 0
  puts "De Apple iPhone X is op voorraad"
elsif samsung_s9_stock > 0
  puts "De Samsung Galaxy S9 is op voorraad"
else
  puts "Helaas! Zowel de Apple iPhone X als de Samsung Galaxy S9 zijn tijdelijk uitverkocht"
end

Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io