Trace the following execution: if (x < 10) { console.log(x + 2); }else { console.log(x + 1); } What will be the console output if x = 102 ОА. 10 O B. 9 ОС. 12 O D. 11

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 5GZ
icon
Related questions
Question
Trace the following execution:
if (x < 10) {
console.log(x + 2);
} else {
console.log(x + 1);
What will be the console output if x = 10?
O A. 10
O B. 9
O C. 12
O D. 11
Transcribed Image Text:Trace the following execution: if (x < 10) { console.log(x + 2); } else { console.log(x + 1); What will be the console output if x = 10? O A. 10 O B. 9 O C. 12 O D. 11
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT