+ 1
=== operator???
I've seen this operator in a course recently, but I don't know what does it does exactly. Can you help?
5 Answers
+ 3
a===b
Its an boolean operator that checks:
If a described a set, would b be a member of that set?
+ 2
=== operator compares if two operands are of equal value and type. Unlike == which only tests for value.
10 == '10' #true
10 === '10' #false
I am not a ruby programmer but I guess it is the same in all languages
_________________________________________
Edit:
Ruby seems to be different from other language
https://stackoverflow.com/questions/3154876/ruby-comparison-operators-vs
+ 2
You may go through https://www.tutorialspoint.com/computer_programming/computer_programming_operators.htm, in this regard.
+ 1
I am also no Ruby Programmer, but I can use google and in 90% it helps...
+ 1
You may find answer in https://en.wikipedia.org/wiki/Operator_(computer_programming),