https://github.com/andriikot/ruby-lesson-3-1-vs-not-js
Ruby lesson 3 -1
https://github.com/andriikot/ruby-lesson-3-1-vs-not-js
Last synced: 5 months ago
JSON representation
Ruby lesson 3 -1
- Host: GitHub
- URL: https://github.com/andriikot/ruby-lesson-3-1-vs-not-js
- Owner: AndriiKot
- Created: 2023-03-22T13:18:26.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-22T13:22:30.000Z (over 2 years ago)
- Last Synced: 2024-12-28T16:43:14.039Z (6 months ago)
- Language: Ruby
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ruby-lesson-3-1-vs-not-Js
Ruby lesson 3 -1```ruby
5 > 3 # true
5 < 3 # false
5 <= 5 # true
5 >= 3 # true5 == 5 # true
5 != 5 # false(1..10) === 5 # true
(1..10) === 11 #false
(1...10) ==== 10 #false
5 === (1..10) #false
Range === (1..10) #true
Numeric === 2 #true
Numeric === 2.0 #true
Integer === 2.0 #false
Float === 2.0 #true
Integer === 5 #true
(1..10) === Range #false
2 === Numeric #false
2.0 === Float #false
5 == '5' #false
5 != '5' #true
5.eql? 5 #true
5.equal? 5 #true'5' == '5' #true
'5'.eql? '5' #true
'5'.equal? '5' #falsea,b = 5,5
a.equal? b #truea,b = '5','5'
a.equal? b #falsea = '5'
b = a.clone
a.eql? b #true
a.equal? b #falsec = '7'
d = c
c.equal? d #truea = c = '5'
a.equal? c #truea = :Hello
b = :Hello
c = :'Hello Ruby!!!'
d = :'Hello Ruby!!!'a.equal? b #true
c.equal? b #true
```