Last active
July 8, 2021 03:01
-
-
Save JuzerShakir/b0a5bc32b0a2c5c836e748caa66116cc to your computer and use it in GitHub Desktop.
Used in variable doc medium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string = "I am a string." # => String | |
int = 123 # => Integer | |
float = 34.5 # => Float | |
complex = 1i # => Complex | |
boolean = true # => Boolean | |
array = [a,b,c] # => Array | |
hash = {ruby: 3.0} # => Hash | |
total = int + float # => 157.5 | |
prok = Proc.new { puts "I'm a Proc" } | |
# => #<Proc:0x000055e15f9f38a0 define_var.rb:1> | |
lambdaa = lambda { puts "I'm a Lambda" } | |
# => <Proc:0x000055e15f9f3850 define_var.rb:2 (lambda)> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment