Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

CIW Exam 1D0-735 Topic 9 Question 37 Discussion

Actual exam question for CIW's 1D0-735 exam
Question #: 37
Topic #: 9
[All 1D0-735 Questions]

Consider the following code:

Which of the following is true based on the above code?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Junita
14 hours ago
Entering 98.7 will result in the statement 'You have a fever', not 'You have no fever'. The condition temp > 98.7 is true for 98.7, so the first part of the ternary operator will be executed.
upvoted 0 times
...
Sharika
4 days ago
The code is valid and will work as expected. The ternary operator is a concise way to assign a value based on a condition.
upvoted 0 times
...
Thora
7 days ago
But if you look at the code, it clearly shows that entering 98.7 will result in 'You have no fever.'
upvoted 0 times
...
Kiera
9 days ago
I disagree, I believe the correct answer is A) fever = (temp > 98.7) ? 'a fever' : 'no fever'; is not a valid statement.
upvoted 0 times
...
Thora
11 days ago
I think the correct answer is B) Entering 98.7 results in the statement. 'You have no fever.'
upvoted 0 times
...

Save Cancel