Help with testing Javascript code: Fundamentals4 exercises


I’m on the Fundamentals 4 javascript exercises and I’ve successfully cloned the exercises from github. My question is when I’m writing the scripts, how can I run them to test that it’s working? Do I have to insert it into an html page to do that? or use the chrome dev tools somehow? Ideally I would like to be able to run the code in sublime and see the output because I like to build them up incrementally, print things to console, etc.
Thanks for any help!


The readme on the github page you cloned them from explains how to run the tests against your code

You should be able to run them the same way in the sublime terminal.


Okay I ended up using the sources panel in the chrome dev tools, where you can write snippets. I could quickly test run them with command+enter, then when they worked I’d paste the functions into the script in sublime(i.e tempConversion.js) and use the terminal on mac to run the Jasmine tests from tempConversion.spec.js.

I realize this was probably a clunky way to do it, but was there a faster way to test the script without having to switch over to from sublime to the terminal every time? You mentioned there is a sublime terminal, was that what I should have been using? Thanks for your help!


I’m not familiar with sublime but I would assume there is a way to run the file that you are in.