javascript 9 pattern