Destructured Assignment in Ruby, PHP, and JavaScript 2007 Feb 21

Stupid Code Tricks:


foo, bar = [1, 2]


list($foo, $bar) = array(1, 2);


[foo, bar] = [1, 2];  // I believe this is only valid in the latest versions of Firefox.
Joe Crawford blogged this at 8:20pm in 2007 in February. The 21st was a Wednesday. You are reading this 12 years later. Make a public comment. There are no comments Tweet. Direct message. Send email. It has hashtags→ .

Leave a Reply

Comments Open; Trackbacks Open.