balancedForLoop.js - Checks for balanced brackets using a for loop. balancedPosition.js - Checks for balanced brackets and returns position and type of missing bracket. balancedReduce.js - Checks for balanced brackets using the reduce() method.
node balanced.js 'hello world'
node balanced.js '{}'
node balanced.js '{{{foo();}}}{}'
node balanced.js '{{}{}}'
node balanced.js '{{{}'
node balanced.js '}'
node balanced.js '{}{foo{}'