Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Please explain each of the following operators and how and when they should be used: ==, ===, eql?, Equal?

Answer Posted / Anjana Yadav

== is the equality operator, it checks if two objects have the same value and the same type. It's commonly used for object comparisons.n=== checks if the left-hand side and right-hand side are equivalent according to a particular classification (such as comparing objects of the same class or instances of the same module).neql? checks whether the left and right operands are exactly equal. It returns true only when both values have the exact same object identity.nEqual? is an alias for eql?

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me the role of modules and mixins in ruby?

2