<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"><div><br></div>It was definitely an interesting the read, I never really noticed the subtle difference. Since then I have also read a few other thoughts on it.<div>For me, function declarations can get convoluted very fast if not use correctly.</div><div>Surely, you should never define functions inside of an if statement, and quite confusing to do it after a return statement.</div><div>But they do have their uses when used correctly.</div><div>I think it ultimately depends on what you are trying to do and whether it make sense to use declarations vs expressions.<div>As long as people understand the difference, and take it case-by-case, its not really something I'm going to mull over too much.<br><br><font color="#990099">-----Matthew Farina <matt@mattfarina.com> wrote: -----</font><div class="iNotesHistory" style="padding-left:5px;"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;">To: "OpenStack Development Mailing List (not for usage questions)" <openstack-dev@lists.openstack.org><br>From: Matthew Farina <matt@mattfarina.com><br>Date: 01/14/2015 07:04AM<br>Subject: [openstack-dev] [horizon] function expressions vs function declarations in JavaScript<br><br><div dir="ltr"><div><div>JavaScript has multiple ways to deal with functions. There are function declarations and function expressions (and named function expressions).<br><br></div>In looking at some reviews and the current code I found some inconsistencies which leads me to ask, is there any guidance for handling this in Horizon? I noticed no documentation in <a href="https://wiki.openstack.org/wiki/Horizon/Javascript" target="_blank">https://wiki.openstack.org/wiki/Horizon/Javascript</a>.<br><br></div>Thanks,<br>Matt<br><br><br></div>
<div><font face="Courier New,Courier,monospace" size="3">__________________________________________________________________________<br>OpenStack Development Mailing List (not for usage questions)<br>Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe<br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br></font></div></div></div></div></div></font>