most used js patterns