TechHui

Hawaiʻi's Technology Community

All Blog Posts Tagged 'functional' (1)

Sequencing computations in Javascript

Sequencing computations in Javascript

Given any sequence of simple assignment statements concluded by a return statement, we can view the whole sequence

as a function that executes the first statement,

and then executes and returns a function that contains the rest of the statements.

For example, this sequence of two statements, which results in 6,



x = 3;

2*x;

=>

6

can be re-written as:



(function(x){

return…
Continue

Added by Leo D on March 20, 2014 at 2:00am — 1 Comment

Most Popular Blog Posts

Monthly Archives

2024

2021

2020

2018

2017

2016

2015

2014

2013

2012

2011

2010

2009

2008

2007

1972

Sponsors

web design, web development, localization

© 2024   Created by Daniel Leuck.   Powered by

Badges  |  Report an Issue  |  Terms of Service