There's no such thing as "client" or "server" languages.
Turing-complete languages like Javascript can be used for any purpose, regardless of its most common application.
Someone has even written a webserver in PostScript: http://www.pugo.org:8080/
Javascript is particularly well suited to evented style programming because it has a very simple support of first class functions.