Complete the code to assign the boolean value true to the variable.
is_valid = [1]In Ruby, the boolean value for true is true (all lowercase).
Complete the code to assign the boolean value false to the variable.
is_active = [1]In Ruby, the boolean value for false is false (all lowercase).
Fix the error in the code by replacing the incorrect nil value.
result = [1]Here, false is the correct boolean value to use instead of nil if you want a boolean false.
Fill both blanks to create a condition that checks if a variable is nil or false.
if value == [1] || value == [2] puts "Value is false or nil" end
To check if a variable is either nil or false, use both values in the condition.
Fill all three blanks to create a hash that maps keys to boolean or nil values.
status = { success: [1], error: [2], pending: [3] }This hash uses Ruby boolean values true, false, and nil correctly.
