Adobe
9A0-127 · Question #75
What is the value of the variable b when the following code block executes? <cfscript> a = 0; b = 1; a = (a)?b:a; if (a) { b = "apple"; }{ b = "pear"; } </cfscript>
The correct answer is D. pear. See the full explanation below for the reasoning.
Question
What is the value of the variable b when the following code block executes? <cfscript> a = 0; b = 1; a = (a)?b:a; if (a) { b = "apple"; }{ b = "pear"; } </cfscript>
Options
- A1
- B0
- Capple
- Dpear
How the community answered
(19 responses)- A11% (2)
- C5% (1)
- D84% (16)
Community Discussion
No community discussion yet for this question.