User talk:JulienDethurens/Essays/Pseudo Ternaries

From Legacy Roblox Wiki
Revision as of 11:20, 26 March 2012 by >NXTBoy (Created page with "==Other forms== {{lua|= ({[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 tr...")
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)