User talk:JulienDethurens/Essays/Pseudo Ternaries

From Legacy Roblox Wiki
Jump to navigationJump to search

Other forms

({[true]=x, [false]=y})[condition]

(condition and function() return x end or function() return y end)()

Both of these work when x and y are not truthy, unlike the standard form.

11:20, 26 March 2012 (UTC)
Oh, nice idea. Never thought about doing it that way. I'll add that, though you can add it yourself if you want. --JulienDethurens 14:07, 26 March 2012 (EDT)