Javascript has many advantages that make it attractive for programming, but it can be an SEO challenge. It is simple to write and user friendly, which are both incredible advantages.  The first challenge of Javascript is that is gives bots a lot to crawl. This decreases the relative importance of other code while also decreasing the chance of a bot recognizing important keywords and links. The answer to this is simple: never put a link or other important SEO content in Javascript. Second, externalize your Javascript code when possible. However, having a small amount of Javascript in a page full of relevant optimized content won’t be a problem.