Error in project Missing ) after argument list

Asked

Viewed 164 times

1

Good afternoon, I am having a problem in my project and have not been able to find out what is causing the problem. Any help is appreciated.

function logOnConsole(newLog) {
currDate = new Date();
currHour = parseInt(currDate.getHours());
currMin = parseInt(currDate.getMinutes());

if(currHour < 10) {
currHourStr = "0" + currHour;
} else {
currHourStr = "" + currHour;
}

if(currMin < 10) {
currMinStr = "0" + currMin;
} else {
currMinStr = "" + currMin;
}
if(logStack == 10) {
    shiftLog("[" + currHourStr + ":" + currMinStr + "]  " + newLog);
} else {
    setLogStr("[" + currHourStr + ":" + currMinStr "]  " + newLog, 
logStack + 1);
    logStack++;
}
}

1 answer

2


In the line 20, you do not concatenate the closing of the brackets.

Substitute

setLogStr("[" + currHourStr + ":" + currMinStr "]  " + newLog,
  logStack + 1);
//                                            ^
//                                            |
//                                           aqui

for:

setLogStr("[" + currHourStr + ":" + currMinStr + "]  " + newLog,
  logStack + 1);
  • Thank you, my distraction.

  • @Gabrielc. You’re welcome! Hugs

Browser other questions tagged

You are not signed in. Login or sign up in order to post.