#Basic: Recursion
Recursion is a fundamental programming concept which can lead to elegant and efficient solutions to algorithmic problems. In fact, recursion is so powerful, all iterating behaviour can be defined using recursive functions. You will find recursion indispensable when iterating over nested data structures.
A recursive function is a function which calls itself. For example, this recursive function will take an array of words, and return an array of those words, uppercased.
function toUpperArray(items) {
if (!items.length) return [] // end condition
var head = items[0] // item to operate on
head = head.toUpperCase() // perform action