Free JavaScript-Developer-I Exam Braindumps

Pass your Salesforce Certified JavaScript Developer I exam with these free Questions and Answers

Page 8 of 44
QUESTION 31

A developer has code that calculates a restaurant bill, but generates incorrectanswers while testing the code:
function calculateBill ( items ) { let total = 0;
total += findSubTotal(items); total += addTax(total);
total += addTip(total); return total;
}
Which option allows the developer to step into each function execution within calculateBill?

  1. A. Using the debugger command on line 05.
  2. B. Using the debugger command on line 03
  3. C. Calling the console.trace (total) method on line 03.
  4. D. Wrapping findSubtotal in a console.log() method.

Correct Answer: A

QUESTION 32

Referto the code below: Const pi = 3.1415326, What is the data type of pi?

  1. A. Double
  2. B. Number
  3. C. Decimal
  4. D. Float

Correct Answer: B

QUESTION 33

A developer creates an object where its properties should be immutable and prevent properties from being added or modified.
Which method shouldbe used to execute this business requirement ?

  1. A. Object.const()
  2. B. Object.eval()
  3. C. Object.lock()
  4. D. Object.freeze()

Correct Answer: D

QUESTION 34

Which three browser specific APIs are available for developers to persist data between page loads ? Choose 3 answers

  1. A. IIFEs
  2. B. indexedDB
  3. C. Global variables
  4. D. Cookies
  5. E. localStorage.

Correct Answer: ABE

QUESTION 35

Universal Container(UC) just launched a new landing page, but users complain that the website is slow. A developer found some functions that cause this problem. To verify this, the developer decides to do everything and log the time each of these three suspicious functions consumes.
console.time(‘Performance’); maybeAHeavyFunction(); thisCouldTakeTooLong(); orMaybeThisOne(); console.endTime(‘Performance’);
Which function can the developer use to obtain the time spent by every one of the three functions?

  1. A. console.timeLog()
  2. B. console.getTime()
  3. C. console.trace()
  4. D. console.timeStamp()

Correct Answer: A

Page 8 of 44

Post your Comments and Discuss Salesforce JavaScript-Developer-I exam with other Community members: