Question #18

Author: admin
tags: JavaScript  
let x;
x = (x = 5) + (x = 10);
console.log(x); // x = ??
What will the console output be?
5
10
15
'510'
'numbernumber'
undefined
'' (empty string)
NaN
No output, a ReferenceError will occur.
Assigning a value to a variable is performed with the return of this value.
So the (x = 5) + (x = 10) transforms into 5 + 10.
Rate the difficulty of the question:
easyhard