Skip to content

Instantly share code, notes, and snippets.

@willread
willread / add1.js
Created August 2, 2012 21:34
Array iteration problem
/*
Solution to the Array Iteration Problem @ http://blog.jazzychad.net/2012/08/01/array-iteration-problem.html
---
add1 - increments items in an array matching specified value
param: arr - array of integers to manipulate
param: val - integer, value to increment