Home | Mailing List | Blog | Tutorial Videos

Comma Operator

Consider the following code block. What gets logged?

let x = 5;
function addFive(num) {
  return num + 5;
}
x = (x++ , x = addFive(x), x *= 2, x -= 5, x += 10);
console.log(x)

Select one: