Google has been reading JavaScript for quite some time now. They can read/execute JavaScript and often do now to discover new pages. That being said, it is still a good idea to avoid using JavaScript for menus and such. It's better to use unordered lists (<ul>) of anchor elements (<a>) to build menus. You have to remember that Google is the exception. Other search engines still cannot read and execute Javascript, and even Google cannot read/execute all JavaScript. Search engines have been built for reading HTML, not every client side scripting language that comes along.
Google ready java script with respect to website url , it cannot read script which is written inside java script. you can manage this issue by adding additional hidden direct html links to the page which you have great content.