I am doing a "Stump the CFChump" series. I recently passed the ColdFusion 9 exam and this is material I learned while studying. I have several CodeSchool gift cards to giveaway so comments who answer correctly I'll email you the discount code. "Stump the Chumps" is from the "Car Talk" so I am spinning that title for ColdFusion. These are questions that stumped me when studying.
- Please try to not google or run the code before answering.
- Must have your correct email address when commenting to receive a CodeSchool giftcard
- Giftcards are available until I run out for correct answers
Stump the CFChump 2
Answer
Stump the CFChump 2b
Question
What will display when this code is ran?
<cfset myvar = "Hello "> <cfif 1 eq true> <cfset myvar = myvar & "Carrie"> <cfelseif 1 eq false> <cfset myvar = myvar & "Brody"> <cfelse> <cfset myvar = myvar & "Saul"> </cfif> <cfoutput>#myvar#</cfoutput>
Answers
A. Hello Carrie
B. Hello Brody
C. Hello Saul
D. Error