| Exam Code/Number: | JS-Dev-101Join the discussion |
| Exam Name: | Salesforce Certified JavaScript Developer - Multiple Choice |
| Certification: | Salesforce |
| Question Number: | 149 |
| Publish Date: | Sep 02, 2026 |
|
Rating
100%
|
|
Corrected code:
let a = "*";
let b = "**";
// x = 3;
console.log(a);
What is displayed when the code executes?
Given the following code:
let x = ('15' + 10) * 2;
What is the value of x?
Refer to the code snippet:
01 function getAvailableilityMessage(item) {
02 if (getAvailableility(item)) {
03 var msg = "Username available";
04 }
05 return msg;
06 }
What is the return value of msg when getAvailableilityMessage("newUserName") is executed and getAvailableility("newUserName") returns false?
Considering type coercion, what does the following expression evaluate to?
true + '13' + NaN
Universal Containers (UC) just launched a new landing page, but users complain that the website is slow. A developer found some functions that might cause this problem. To verify this, the developer decides to execute everything and log the time each of these three suspicious functions consumes.
01 console.time('Performance');
02
03 maybeAHeavyFunction();
04
05 thisCouldTakeTooLong();
06
07 orMaybeThisOne();
08
09 console.endTime('Performance');
Which function can the developer use to obtain the time spent by every one of the three functions?