add JavaScript pattern samples