Pregunta de entrevista de Wunderman

var a = 2; console.log( ++a + ++a + a++)

Respuestas de entrevistas

Anónimo

27 jul 2019

++a mean increment right side operand by 1 which one. i wasn't able to explain a++. but gave current answer which is 8.

Anónimo

21 oct 2020

since the whole expression is only made up of postfix and prefix, assignment will be done in left to right order var a=2; ++a + ++a + a++ 3 + 4 + 4 =11