The Syntax Error: missing ) after argument list” occurs when we make a syntax error when calling a function, e.g. forget to separate its arguments with a comma. To solve error make sure to correct any syntax errors in the arguments list of the function invocation.


If you can’t determine where the error is thrown, look at the error message in your browser’s console or your terminal (if using Node.js).
Since template literals wrap the string using backticks, we are able to use both single and double quotes in the contents of the string, without getting any errors and without having to escape any single or double quotes.
Conclusion:
To solve the “missing ) after argument list” error, make sure to correct any syntax errors when calling functions. The error is often thrown when function arguments aren’t separated by a comma when the function is invoked.