MCQs > IT & Programming > JavaScript > Consider the following code: Which one shows the correct values for 'variable1' and 'variable2'?

JavaScript MCQs

Consider the following code:

<script type="application/javascript;version=1.8">

var x = 5;

var y = 0;

 

var variable2=x + y;

 

let (x = x+10, y = 12) {

  var variable1=x+y;

}

 

variable2=x + y;

 

</script>

Which of the following choices shows the correct values for "variable1" and "variable2"?

Answer

Correct Answer: variable1: 27 variable2: 5

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it