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:

Tamar
1 months ago
The code looks like it was written by a programmer with a fever. Maybe they should have checked their own temperature first.
upvoted 0 times
Leonor
16 days ago
B) Entering 98.7 results in the statement. \'You have no fever \'
upvoted 0 times
...
Sean
27 days ago
A) fever = (temp > 98.7) ? \'a fever\': \'no fever\'; is not a valid statement
upvoted 0 times
...
...
Kimbery
1 months ago
The checktemp function will run because it is called before it is defined. In JavaScript, function declarations are hoisted to the top of the scope, so the function will be available when it is called.
upvoted 0 times
...
Audry
1 months ago
The default value of 0 will not be displayed because the ternary operator will always assign a value, either 'a fever' or 'no fever'.
upvoted 0 times
Isaac
9 days ago
C) The default value of 0 will be displayed when the page loads
upvoted 0 times
...
Catarina
19 days ago
B) Entering 98.7 results in the statement. \'You have no fever \'
upvoted 0 times
...
Desirae
22 days ago
A) fever = (temp > 98.7) ? \'a fever\': \'no fever\'; is not a valid statement
upvoted 0 times
...
Mirta
23 days ago
C) The default value of 0 will be displayed when the page loads
upvoted 0 times
...
Hillary
27 days ago
B) Entering 98.7 results in the statement. \'You have no fever \'
upvoted 0 times
...
Carole
1 months ago
A) fever = (temp > 98.7) ? \'a fever\': \'no fever\'; is not a valid statement
upvoted 0 times
...
...
Junita
2 months 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
Joanne
9 days ago
User 2: B) Entering 98.7 results in the statement 'You have no fever'
upvoted 0 times
...
Lelia
12 days ago
User 1: A) fever = (temp > 98.7) ? 'a fever': 'no fever'; is not a valid statement
upvoted 0 times
...
...
Sharika
2 months 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
2 months 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
2 months 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
2 months ago
I think the correct answer is B) Entering 98.7 results in the statement. 'You have no fever.'
upvoted 0 times
...

Save Cancel