A.) def my_method(x = 10) B.) def my_method(x, y = 10) C.) def my_method(x?, y) D.) def my_method(x, y?)
A.) To create a new class B.) To define a loop C.) To generate getter and setter methods for class attributes D.) To declare a variable
A.) @my_var = value B.) var my_var = value C.) $my_var = value D.) @@my_var = value
A.) To exit the block B.) To create a loop C.) To pass control back to the caller and execute the caller's block D.) To declare a variable
A.) def MyClass.my_method B.) def my_method.self C.) def self.my_method D.) self.my_method
A.) 1..10 B.) 1-10 C.) [1, 10] D.) (1...10)
A.) To define a function B.) To execute code based on a condition C.) To create an object D.) To declare a variable
A.) private def my_method B.) def private my_method C.) def my_method.private D.) private: my_method
A.) To exit the loop B.) To restart the loop C.) To skip to the next iteration of the loop D.) To define a function
A.) {1: "one", 2: "two"} B.) {1 => "one", 2 => "two"} C.) [1: "one", 2: "two"] D.) [1 => "one", 2 => "two"]