JavaScript - client side or both client & sever side

I’m just a newbie…my question may seem very kiddish…I had an argument over this topic with my friends…

Is JavaScript only a client side programming language or is it both a server and client side scripting language???

It’s both, while still predominantly a client-side language, it can be used as a server-side language as well.

Javascript has been a very versatile language for a long time. With the recent rise in popularity of [URL=“http://nodejs.org/”]Node.js it has become much more popular to use on the server as well. It was possible to do this before Node.JS (and [URL=“http://www.commonjs.org/”]Common.JS) were around as well though, and even command-line applications can be written in JavaScript.

Thanks a looott!!