The JavaScript command-line is a command-line interface (CLI, shell, REPL) included in the Chrome DevTools Console. Use the command-line to evaluate JavaScript directly in the Console.
When working on 111 projects, our standard approach is to follow two steps in this order:
- Command-Line JavaScript: Write, test and debug JavaScript code using the command-line.
i) First, write your JavaScript code using Atom, and store the code in a .js file.ii) Second, test the code by copying it from Atom and pasting it into the DevTools Console.iii) When your code is error-free and working correctly, then you can upload the .js file to the server using CyberDuck or Sublime.
- Client-Side JavaScript: Some projects require you to connect the .js file to a .html file. To do this you would edit and test your JavaScript code as described in Step 1, above. Then you would connect the .js file to a web page. Read Client-Side JavaScript for details.