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
2 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
Tamie
28 days ago
C) The default value of 0 will be displayed when the page loads
upvoted 0 times
...
Leonor
2 months ago
B) Entering 98.7 results in the statement. \'You have no fever \'
upvoted 0 times
...
Sean
2 months ago
A) fever = (temp > 98.7) ? \'a fever\': \'no fever\'; is not a valid statement
upvoted 0 times
...
...
Kimbery
2 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
2 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
1 months ago
C) The default value of 0 will be displayed when the page loads
upvoted 0 times
...
Catarina
2 months ago
B) Entering 98.7 results in the statement. \'You have no fever \'
upvoted 0 times
...
Desirae
2 months ago
A) fever = (temp > 98.7) ? \'a fever\': \'no fever\'; is not a valid statement
upvoted 0 times
...
Mirta
2 months ago
C) The default value of 0 will be displayed when the page loads
upvoted 0 times
...
Hillary
2 months ago
B) Entering 98.7 results in the statement. \'You have no fever \'
upvoted 0 times
...
Carole
2 months ago
A) fever = (temp > 98.7) ? \'a fever\': \'no fever\'; is not a valid statement
upvoted 0 times
...
...
Junita
3 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
1 months ago
User 2: B) Entering 98.7 results in the statement 'You have no fever'
upvoted 0 times
...
Lelia
1 months ago
User 1: A) fever = (temp > 98.7) ? 'a fever': 'no fever'; is not a valid statement
upvoted 0 times
...
...
Sharika
3 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
3 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
3 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
3 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
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77
a