For instance, if you were to run a Python script you would type python filename.py or if you wanted to run a C program make filename then ./ filename>
On Ubuntu, install libjavascriptcoregtk-3.0-bin and use /usr/bin/jsc (manpage).
/usr/bin/jsc