実際には JavaScript/言語ファイルはありませんが、手動でカスタマイズできます。LyX エディタの [パラメータ] -> [詳細設定] タブでコード ブロックを右クリックすると、リスト オプションを手動で設定できます (注意: 私の LyX はフランス語なので、クリックするパスは少し異なる可能性があります)。
http://lenaherrmann.net/2010/05/20/javascript-syntax-highlighting-in-the-latex-listings-packageに続いて、追加しました:
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}