&& Versus And

Submitted By:
david

Difficulty:
Elementary

Tags:
operators, presidence

Instructions:
Many times new Ruby programmers will use "and" in place of "&&" because it's easier to read. However, there's a difference as this problem demonstrates.

Code:
roses = "blue" && "red"
violets = "blue" and "red"

assert_equal roses, "red"
assert_equal violets, ___

Your Solution

Ruby 1.9.3

Back to Problems