add js pattern practice