Challenge Project Number Guesser-help on the terminal

So I am working on this project( using my own editor and I am almost done but I am hitting a snag. Here is the code that I was asked to make using Javascript.


let humanScore = 0;
let computerScore = 0;
let currentRoundNumber = 1;

// Write your code below:
const generateTarget = () => {
    return Math.floor(Math.random() * 10);

const compareGuesses = (humanGuess, computerGuess, targetGuess) => {
    const humanDifference = Math.abs(targetGuess - humanGuess);
    const computerDifference = Math.abs(targetAnswer - computerGuess);
    return humanDifference <= computerDifference;

const updateScore = winner => {
    if (winner === 'human') {
    } else if (winner === 'computer') {

const advanceRound = () => currentRoundNumber++;



Now I go to log it into the terminal using “node.script.js” and it’s not working. it gives me the following:

PS C:\Users\XXXX\Desktop\Important\Codecademy\Projects\number-guesser-starting> node.script.js
node.script.js : The term 'node.script.js' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the 
path is correct and try again.
At line:1 char:1
+ node.script.js
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (node.script.js:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\XXXX\Desktop\Important\Codecademy\Projects\number-guesser-starting> 

Not sure what I am doing wrong. So any help given is very much appreciated. Thank you.

Hey there,

You should run the command as “node script.js”.

In yours there is a period between node and script.


1 Like