js general patterns