Ad
  • Default User Avatar

    After completing this kata (clicking "Attempt" and passing), then trying to test again (even with the same exact code), you get this error message (might be something else but that's how I've managed to get this to happen):

    /home/codewarrior/node/test.js:13

    ;(function() {

    ^

    SyntaxError: Unexpected token ;

    at new Script (vm.js:80:7)
    
    at createScript (vm.js:274:10)
    
    at Object.runInThisContext (vm.js:326:10)
    
    at Module._compile (internal/modules/cjs/loader.js:664:28)
    
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    
    at Module.load (internal/modules/cjs/loader.js:600:32)
    
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    
    at Module.require (internal/modules/cjs/loader.js:637:17)
    
    at require (internal/modules/cjs/helpers.js:22:18)
    
    at /home/codewarrior/node/node_modules/.registry.npmjs.org/mocha/5.2.0/node_modules/mocha/lib/mocha.js:250:27
    
    at Array.forEach (<anonymous>)
    
    at Mocha.loadFiles (/home/codewarrior/node/node_modules/.registry.npmjs.org/mocha/5.2.0/node_modules/mocha/lib/mocha.js:247:14)
    
    at Mocha.run (/home/codewarrior/node/node_modules/.registry.npmjs.org/mocha/5.2.0/node_modules/mocha/lib/mocha.js:576:10)
    
    at Object.<anonymous> (/home/codewarrior/node/node_modules/.registry.npmjs.org/mocha/5.2.0/node_modules/mocha/bin/_mocha:637:18)
    
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    
    at Module.load (internal/modules/cjs/loader.js:600:32)
    
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    
    at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
    
    at startup (internal/bootstrap/node.js:283:19)
    
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
    
  • Custom User Avatar

    Comparing indices in an array is not a novel idea.