Refer to code below:
Let a ='a';
Let b;
// b = a;
console.log(b);
What is displayed when the code executes?
A. ReferenceError: b is not defined
B. A
C. Undefined
D. Null
Given the code below:
01 function GameConsole (name) {
02 this.name = name;
03 }
05 GameConsole.prototype.load = function(gamename) {
06 console.log( ` $(this.name) is loading agame : $(gamename) ...`);
07 )
08 function Console 16 Bit (name) {
09 GameConsole.call(this, name) ;
10 }
11 Console16bit.prototype = Object.create ( GameConsole.prototype) ;
12 //insert code here
13 console.log( ` $(this.name) is loading a cartridge game :$(gamename) ...`);
14 }
15 const console16bit = new Console16bit(` SNEGeneziz ');
16 console16bit.load(` Super Nonic 3x Force ');
What should a developer insert at line 15 to output the following message using the method ?
> SNEGeneziz is loading a cartridgegame: Super Monic 3x Force . . .
A. Console16bit.prototype.load(gamename) = function() {
B. Console16bit.prototype.load = function(gamename) {
C. Console16bit = Object.create(GameConsole.prototype).load = function (gamename) {
D. Console16bit.prototype.load(gamename) {
Refer to the code below:
01 const server = require(`server');
02 /* Insert code here */
A developer imports a library that creates a web server.The imported library uses events and callbacks to start the servers
Which code should be inserted at the line 03 to set up an event and start the web server ?
A. Server.start ();
B. server.on(` connect ' , ( port) => { console.log(`Listening on ' , port);})
C. server()
D. serve(( port) => (
E. console.log( `Listening on ', port) ;
A developer has the following array of student test grades:
Let arr = [ 7, 8, 5, 8, 9 ];
The Teacher wants to double each score and then see an array of the students who scored more than 15 points.
How should thedeveloper implement the request?
A. Let arr1 = arr.filter(( val) => ( return val > 15 )) .map (( num) => ( return num *2 ))
B. Let arr1 = arr.mapBy (( num) => ( return num *2 )) .filterBy (( val ) => return val > 15 )) ;
C. Let arr1 = arr.map((num) => num*2). Filter (( val) => val > 15);
D. Let arr1 = arr.map((num) => ( num *2)).filterBy((val) => ( val >15 ));
Refer to the code below:
Let str = `javascript';
Str[0] = `J';
Str[4] = 'S';
After changing the stringindex values, the value of str is `javascript'. What is the reason
for this value:
A. Non-primitive values are mutable.
B. Non-primitive values are immutable.
C. Primitive values are mutable.
D. Primitive values are immutable.
Given the code below:
Which three code segments result in a correct conversion from number to string? Choose 3 answers
A. let strValue = numValue. toString();
B. let strValue = * * 4 numValue;
C. let strValue = numValue.toText ();
D. let scrValue = String(numValue);
E. let strValue = (String)numValue;
A developer writers the code below to calculate the factorial of a given number.
Function factorial(number) {
Return number + factorial(number -1);
}
factorial(3);
What isthe result of executing line 04?
A. 0
B. 6
C. -Infinity
D. RuntimeError
Refer to the following code:
Let sampleText = `The quick brown fox jumps';
A developer needs to determine if a certainsubstring is part of a string.
Which three expressions return true for the given substring ?
Choose 3 answers
A. sampleText.includes(`fox');
B. sampleText.includes(` quick ', 4);
C. sampleText.includes(` Fox ', 3)
D. sampleText.includes(` fox ');
E. sampleText.includes(` quick ') !== -1;
Refer to thecode below:
let sayHello = () => {
console.log (`Hello, world!');
};
Which code executes sayHello once, two minutes from now?
A. setTimeout(sayHello, 12000);
B. setInterval(sayHello, 12000);
C. setTimeout(sayHello(), 12000);
D. delay(sayHello, 12000);
A developer wants to leverage a module to print a price in pretty format, and has imported a method as shown below:
Import printPrice from `/path/PricePrettyPrint.js';
Based on the code, what mustbe true about the printPrice function of the PricePrettyPrint module for this import to work ?
A. printPrice must be be a named export
B. printPrice must be an all export
C. printPrice must be the default export
D. printPrice must be a multi exportc
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Salesforce exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your JAVASCRIPT-DEVELOPER-I exam preparations and Salesforce certification application, do not hesitate to visit our Vcedump.com to find your solutions here.