JavaScript Bracket Generator