Actually there is no JavaScript / language file, but you can configure it manually. When you right-click on a block of code in your LyX editor, tabs "Options-> Advanced", you can manually set the parameters for your publication (NB: my LyX is in French, so the path to the click may be slightly different).
Following http://lenaherrmann.net/2010/05/20/javascript-syntax-highlighting-in-the-latex-listings-package , I added:
comment={[l]{//}} commentstyle={\color{purple}\ttfamily} identifierstyle={\color{black}} keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break} keywordstyle={\color{blue}\bfseries} morecomment={[s]{}} ndkeywords={class, export, boolean, throw, implements, import, this} ndkeywordstyle={\color{darkgray}\bfseries} sensitive=false stringstyle={\color{red}\ttfamily}
piercus Mar 05 '13 at 13:27 2013-03-05 13:27
source share