Ad
  • Default User Avatar

    Actually, since you would never really need a fraction of a cent, you will round to 2 decimal places. Besides, with things like this, the result is almost always in scientific notation, which is just confusing. We need a place to round to.

  • Default User Avatar

    That's the point.

    It's testing to see if your code can determine whether you're ending up at your original spot. If your code can't determine that, it's incorrect code.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    Remember, it can't be changed now.

  • Default User Avatar

    No, but it's too late to change it anyway.

  • Default User Avatar

    Nvm, figured out the problem. Can't delete my comment, though.

  • Default User Avatar

    Also, anyone know how to make my code look...not weird in that comment?

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • 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)
    
  • Default User Avatar

    Yea, my code passed all the sample tests...but doesn't work because I couldn't see the rest of the tests.