I'm practicing my returning and functions and printing, but for some reason, when I test it, it doesn't show the values after beef. burgers=854649
function cheese()
print ("lettuce") print ("lettuce") print ("lettuce") print ("lettuce") print ("lettuce") return "beef"
end
print (burgers) burgers=cheese print (cheese()) ~~~~~~~~~~~~~~~~~
Nothing is wrong.
The output is this, correctly:
854649 lettuce lettuce lettuce lettuce lettuce beef
Line 18 in the snippet you posted doesn't really matter, since you don't use burgers
after that. You can remove it.
burgers = 854649 function cheese() print ("lettuce") print ("lettuce") print ("lettuce") print ("lettuce") print ("lettuce") return "beef" end print(burgers) -- 854649 print( cheese() ) -- cheese() prints: -- lettuce, lettuce, lettuce, lettuce, lettuce -- `cheese()`returns "beef" -- prints evaluation of `cheese()` which is "beef"