Datatypes
Goals
Step 1
IRB"Letters and words".classExpected result:StringIRB'a'.class 5.class 3.14.class true.class :symbol.class [ 1, 2, 3].class {name: "value"}.class nil.class Class.class
Step 2
IRB"five".methodsIRB5.methods
Step 3
IRB5 + 5 "5" + "5"IRB5 + 5.0IRB5 + "5" "5" + 5
Step 4
IRB5.to_s 5.to_s.class 5.to_f 5.to_f.class 5.67.to_i "5".to_i "5".to_i.classIRB"I am not a number".to_i "five".to_iIRB5 + "5".to_i "5 plus" + 5.to_sIRB5.methods.sort
Explanation
Next Step:
Go on to Strings
Back to Variables