Error message, help please

Hello everyone.
this the all of the code and, gonna add the error at the bottom .
if you can spot the mistake please let me know.
thank you!

const prompt = require ('prompt-sync') ();

const ROWS = 3;
const COLS = 3;
const SYMBOLS_COUNT = {
    A: 2,
    B: 4,
    C: 6,
    D: 8,
}
const SYMBOLS_VALUES = {
    A: 5,
    B: 4,
    C: 3,
    D: 2,
}



const deposit = () => {
    while(true) {
    const depositAmount = prompt ('Enter a deposit amount: ');
        const numberDepositAmount = parseFloat (depositAmount);

        if (isNaN(numberDepositAmount) || numberDepositAmount <= 0) {
            console.log('Invalid deposit amount, try again.')
        }else  {
            return numberDepositAmount;
        }
    }
    };

      
    const getNumberOfLines = () => {
        while(true) {
            const lines = prompt ('Enter the numbers of lines to bet on (1-3): ');
                const numberOfLines = parseFloat (lines);
        
                if (isNaN(numberOfLines) || numberOfLines<= 0 || numberOfLines > 3) {
                    console.log('Invalid number of lines, try again.')
                }else  {
                    return numberOfLines;
                }
            }
            };
            
    const getBet = (balance, lines) => {
        while(true) {
            const bet = prompt ('Enter the bet per line: ');
                const numberBet = parseFloat (bet);
        
                if (isNaN(numberBet) || numberBet <= 0 || numberBet > balance / lines) {
                    console.log('Invalid bet, try again.')
                }else  {
                    return numberBet;
                }
            }
            };            

    const spin = () => {
        const symbols = [];
        for (const [symbol, count] of object.entries(SYMBOLS_COUNT)) {
            console.log(symbol, count); 
        }
    };
    
    spin (); 

    let balance = deposit();
    const numberOfLines = getNumberOfLines();
    const bet = getBet(balance, numberOfLines); 

the error goes like this:

JavaScript Projects % node project.js
/Users/Documents/Developer/JavaScript Projects/project.js:71
        for (const [symbol, count] of object.entries(SYMBOLS_COUNT)) {
                                             ^

ReferenceError: object is not defined
    at spin (/Users//Documents/Developer/JavaScript Projects/project.js:71:46)
    at Object.<anonymous> (/Users//Documents/Developer/JavaScript Projects/project.js:76:5)

    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47

The error message indicates the issue is within this line:

object refers to a variable, which in this case is not defined. Did you mean to use the global Object?

Yes. it is global object.

Note that variables are case sensitive.

object, which you have, refers to a variable object which you would need to define.

Object refers to the global Object object.

pls i need your help with my code check my post

Please do not hijack another users post for help with your own question.

You have created your topic, now you need to be patient and wait for someone to help

am sorry i need urgent help i have been on this for hours. you can also help me too

Well, there are some logical errors with your code:

const prompt = require('prompt-sync')();

const ROWS = 3;
const COLS = 3;
const SYMBOLS_COUNT = {
    A: 2,
    B: 4,
    C: 6,
    D: 8,
}
const SYMBOLS_VALUES = {
    A: 5,
    B: 4,
    C: 3,
    D: 2,
}

const deposit = () => {
    while (true) {
        const depositAmount = prompt('Enter a deposit amount: ');
        const numberDepositAmount = parseFloat(depositAmount);

        if (isNaN(numberDepositAmount) || numberDepositAmount <= 0) {
            console.log('Invalid deposit amount, try again.')
        } else {
            return numberDepositAmount;
        }
    }
};

const getNumberOfLines = () => {
    while (true) {
        const lines = prompt('Enter the numbers of lines to bet on (1-3): ');
        const numberOfLines = parseFloat(lines);

        if (isNaN(numberOfLines) || numberOfLines <= 0 || numberOfLines > 3) {
            console.log('Invalid number of lines, try again.')
        } else {
            return numberOfLines;
        }
    }
};

const getBet = (balance, lines) => {
    while (true) {
        const bet = prompt('Enter the bet per line: ');
        const numberBet = parseFloat(bet);

        if (isNaN(numberBet) || numberBet <= 0 || numberBet > balance / lines) {
            console.log('Invalid bet, try again.')
        } else {
            return numberBet;
        }
    }
};

const spin = () => {
    const symbols = [];
    for (const [symbol, count] of Object.entries(SYMBOLS_COUNT)) {
        console.log(symbol, count);
    }
};

spin();

let balance = deposit();
const numberOfLines = getNumberOfLines();
const bet = getBet(balance, numberOfLines);

I hope it will resolve this error.
Thanks

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.