Self Learning JS Patterns