Given the following code in JavaScript:
let x = 5;
let y = 6;
const name = 'Jack';
if (name === 'Jack')
y = 7;
x = 9;
if (name === 'Sally')
y = 8;
x = 10;
What is the value of x
and y
?
x === 10
, y === 8
x === 9
, y === 7
x === 5
, y === 6
x === 10
, y === 7