-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.rb
78 lines (45 loc) · 827 Bytes
/
variables.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Data Types
=begin
Interger/ Numbers
Float
String
Boolean
Symbol
Hashes/ Objects(in JS)
Arrays
Nil
=end
# name = "andrew"
# students = ["Andrew", "Job", "Valeria"]
# # puts name.methods
# pp students
# p name
# puts name
# puts name.length
# puts name.capitalize
# puts name.reverse
# puts name.upcase
# puts "hello".class
# Math methods
# puts 7.4.floor
# puts 7.4.ceil
# puts 7.next
#methods
# def say_hello()
# "hello!"
# end
# puts say_hello
# def add(num1, num2)
# num1 + num2
# end
# puts add(3,2)
# name = "Joe"
# def greeting(name)
# puts "Hello, #{name}"
# end
# greeting("Jane")
# $evil_monster = "Bowser"
# def princess_peaches_castle
# puts "#{$evil_monster} is trying to kidnap Princess Peach!"
# end
# princess_peaches_castle