locked
js debugger RRS feed

  • Question

  • User1024191908 posted

    I encounter an error in the js debugger of browsers like chrome and firefox that say:

    "Expected an expression but got )"

    I searched the internet and learned that something like this might have happened:

    functionName(3,);

    but the link to the place where the error has happened doesn't really show my the error...it's an empty line in the code.

    any suggestions on how to find where the error has happened?

    thanks in advance

    Sunday, February 25, 2018 4:01 PM

Answers

  • User-1838255255 posted

    Hi anooshiravan,

    According to your description and code, may be you want to call the JS function, but this function needs parameter, check need how many parameters? if only need one parameter, please remove , , like functionname(3); if need two parameters, please add the second parameter after ,.  

    About how to debug JS code and check which line caused error, please check this tutorial: 

     https://www.w3schools.com/js/js_debugging.asp 

    Best Regards,

    Eric Du 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 26, 2018 2:17 AM