Forum Moderators: open
It won't index the text within the JS, but if it's setup properly, it shouldn't be too big of a roadblock to proper spidering.
That said...it's generally good practice both for helping spiders navigate and for cutting download time to put your Javascript in an external JS file and refer to it from the code of the page.