You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first function below, does not make any calls to operation(), but is still seen as correct.
This is so even though only dashes were logged to console.
function repeat(operation, num) {
if ( num == 0 )
return
repeat(operation, num - 1);
}
The solution as supplied:
function repeat(operation, num) {
if (num <= 0) return
operation()
return repeat(operation, --num)
}
The text was updated successfully, but these errors were encountered:
The first function below, does not make any calls to operation(), but is still seen as correct.
This is so even though only dashes were logged to console.
The solution as supplied:
The text was updated successfully, but these errors were encountered: