+ 1

=== operator???

I've seen this operator in a course recently, but I don't know what does it does exactly. Can you help?

25th Apr 2020, 10:06 AM
Sámuel Keresztes
Sámuel Keresztes - avatar
5 Antworten
+ 3
a===b Its an boolean operator that checks: If a described a set, would b be a member of that set?
25th Apr 2020, 10:11 AM
Alexander Thiem
Alexander Thiem - avatar
+ 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
25th Apr 2020, 11:12 AM
Ore
Ore - avatar
27th Apr 2020, 3:17 PM
narayanaprasad
narayanaprasad - avatar
+ 1
I am also no Ruby Programmer, but I can use google and in 90% it helps...
25th Apr 2020, 11:14 AM
Alexander Thiem
Alexander Thiem - avatar
+ 1
You may find answer in https://en.wikipedia.org/wiki/Operator_(computer_programming),
27th Apr 2020, 3:16 PM
narayanaprasad
narayanaprasad - avatar