Short version:
x ||= y means that if x is false, set it to y.
Long version:
||= is an assignment operator.
x ||= y is the same thing as
x = x || y.
|| is the logical-OR operation. If the first operand (x) is a true value, it is returned. If it is false, the second operand (y) is returned. This is the typical logical-OR shortcircuiting behavior seen in C and many other languages.
Regards,
Alister
---------- Post updated at 09:58 AM ---------- Previous update was at 09:56 AM ----------
Quote:
Originally Posted by
giridhar276
---------- Post updated at 08:17 AM ---------- Previous update was at 07:16 AM ----------
Don't bump your posts unless there is new, relevant information. Or at least wait a day. If it's an urgent matter, there's an Emergency forum you can use.
Regards,
Alister