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

Salesforce Exam Javascript Developer I Topic 1 Question 99 Discussion

Actual exam question for Salesforce's Javascript Developer I exam
Question #: 99
Topic #: 1
[All Javascript Developer I Questions]

Refer to the following code that performs a basic mathematical operation on a provided

input:

function calculate(num) {

Return (num +10) / 3;

}

How should line 02 be written to ensure that x evaluates to 6 in the line below?

Let x = calculate (8);

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Georgeanna
3 days ago
D is the way to go. Why bother with extra steps when you can just wrap the whole expression in 'Number()'?
upvoted 0 times
...
An
5 days ago
I think B is the right answer. Explicitly converting 'num + 10' to a number using 'Number()' is the way to go.
upvoted 0 times
...
Melina
6 days ago
The correct answer is D. The 'Number' function is used to convert the result of '(num + 10) / 3' to a number, ensuring that the final value is 6.
upvoted 0 times
...
Sarina
7 days ago
I think the answer is D.
upvoted 0 times
...

Save Cancel