| Exam Name: | Salesforce Certified JavaScript Developer (JS-Dev-101) | ||
| Exam Code: | JavaScript-Developer-I Dumps | ||
| Vendor: | Salesforce | Certification: | Salesforce Developer |
| Questions: | 147 Q&A's | Shared By: | yara |
A developer imports:
import printPrice from ' /path/PricePrettyPrint.js ' ;
What must be true about printPrice for this import to work?
Given the code:
01 function GameConsole(name) {
02 this.name = name;
03 }
04
05 GameConsole.prototype.load = function(gamename) {
06 console.log( ' ${this.name} is loading a game: ${gamename}.... ' );
07 }
08
09 function Console16bit(name) {
10 GameConsole.call(this, name);
11 }
12
13 Console16bit.prototype = Object.create(GameConsole.prototype);
14
15 // insert code here
16 console.log( ' ${this.name} is loading a cartridge game: ${gamename}.... ' );
17 }
18
19 const console16bit = new Console16bit( ' SNEGeneziz ' );
20 console16bit.load( ' Super Monic 3x Force ' );
What should a developer insert at line 15?
Refer to the code below:
01 function myFunction(reassign) {
02 let x = 1;
03 var y = 1;
04
05 if (reassign) {
06 let x = 2;
07 var y = 2;
08 console.log(x);
09 console.log(y);
10 }
11
12 console.log(x);
13 console.log(y);
14 }
What is displayed when myFunction(true) is called?
Original code:
01 let requestPromise = client.getRequest;
03 requestPromise().then((response) = > {
04 handleResponse(response);
05 });
The developer wants to gracefully handle errors from a Promise-based GET request.
Which code modification is correct?