Searching and Sorting without Loops

Searching and Sorting without Loops

Presented at San Francisco JavaScript meetup: http://www.meetup.com/jsmeetup/events/160602812/.

This talk introduces the functional programming side of JavaScript by exploring various higher-order functions of the built-in Array object. The use of these higher-order functions allows several different possible iterations without using an explicit for/while statement at all:

* Build a sequence of numbers and characters
* Create a list of all prime numbers in a given range
* Compute factorial and construct Fibonacci series
* Perform basic search operations
* Implement insertion sorting via a sorting network

For links to follow-up resources, read also:
http://ariya.ofilabs.com/2014/01/searching-and-sorting-without-loops.html.

0284b8950e0f4a57bcc092d4dbb98d97?s=128

Ariya Hidayat

January 28, 2014
Tweet