Is Javascript text indexed in google results?

The answer is Yes. Today I did an experiment and google does index Javascript code in its results.

My test exercise was the following.

You will notice on this page, it contains words in blue in the comments box that you don't need to be logged in order to leave commments because you are not required to be logged in. (I dont want to put the exact words because this page is also a test)

You can google this page and if you look in the Cache, you will find the blue text which comes from the javascript file not the page HTML.