QUESTION IMAGE
Question
multiple choice 1 point
what will be the order of letters printed to the console when this program is run?
1 console.log(\a\);
2 letters();
3 letters();
4 function letters() {
5 console.log(\b\);
6 console.log(\c\);
7 }
abca
abcbcbc
abc
abcbc
Step1: Analyze the first call
The first line console.log("a") prints "a". Then letters() is called. Inside the letters function, "b" and "c" are printed. So after the first letters() call, we have "a", "b", "c".
Step2: Analyze the second call
Then there is a second letters() call. Again, inside the letters function, "b" and "c" are printed.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
abcbc