JavaScript Coding Editor for Technical Interviews

Running Node.js v16 - Autocomplete is enabled

Use HTML/CSS/JS for React, AngularJS, Vue.js, and other Javascript frameworks.

We provide a highly interactive REPL, which allows access to your runtime variables. If there were no errors, you will have a REPL with access to all of the global variables and functions defined in your script.

We run NodeJS with the --harmony flag on, which gives you access to many staged new features coming to the JavaScript spec. For a complete description of which modern JavaScript features are available, check out the Node compatibility table.Your code is also run for you in strict mode by default, which will enable features like const and let to work without configuration on your part.

We also have an array of interesting npm packages available for your use:

Here’s a quick example of how to use sinon and chai:

var chai = require('chai') var sinon = require('sinon') var sinonChai = require('sinon-chai') chai.should() chai.use(sinonChai) function hello(name, cb) { cb('hello ' + name) } var cb = sinon.spy() hello('world', cb) cb.should.have.been.calledWith('this test should fail')
Code language: JavaScript (javascript)

as well as mocha:

var Mocha = require('mocha') var assert = require('assert') var mocha = new Mocha() // Bit of a hack, sorry! mocha.suite.emit('pre-require', this, 'solution', mocha) describe('Test suite', function() { it('should work', function() { assert(true) }) })
Code language: JavaScript (javascript)
  • asyncrequest, and isomorphic-fetch for making async HTTP a little more convenient.
  • q and bluebird are promise libraries to help make managing async in general easier.
  • jsdom is a library for mimicking an HTML DOM within our JS environment. Useful if you want to test how candidates can manipulate elements without using our full HTML/CSS/JS environment.

Try Our JavaScript Editor