JavaScript console in Sublime Text

  1. Tools -> Build System -> New Build System…
1
2
3
4
5
6
{
// "shell_cmd": "make"
"cmd": ["node", "$file", "$file_base_name"],
"working_dir": "${project_path:${folder}}",
"selector": "*.js"
}
  1. Save as JavaScript.sublime-build

  2. Choose Automatic/JavaScript, run *.js

1
2
var fName = function(fVal) {}; 
console.log(fName(fVal));