Which option is a core Node,js module?
A. Path
B. Ios
C. Memory
D. locate
Refer to the code below:
for(let number =2 ; number <= 5 ; number += 1 ) {
// insert code statement here
}
Thedeveloper needs to insert a code statement in the location shown. The code statement has these requirements:
1.
Does require an import
2.
Logs an error when the boolean statement evaluates to false
3.
Works in both the browser and Node.js Which meet the requirements?
A. assert (number % 2 === 0);
B. console.error(number % 2 === 0);
C. console.debug(number % 2 === 0);
D. console.assert(number % 2 === 0);
A developer has a web serverrunning with Node.js. The command to start the web server is node server.js. The web server started having latency issues. Instead of a one second turnaround for web requests, the developer now sees a five second turnaround.
Which command can the web developer run to see what the module is doing during the latency period?
A. NODE_DEBUG=true node server.js
B. DEBUG=http, https node server.js
C. NODE_DEBUG=http,https node server.js
D. DEBUG=true node server.js
Cloud Kicks has a class to represent items for sale in an online store, as shown below:
Class Item{
constructor (name, price){
this.name = name;
this.price = price;
}
formattedPrice(){
return `s' + String(this.price);}}
A new business requirement comes in that requests a ClothingItem class that should have all of the properties and methods of the Item class but will also have properties that are specific to clothes.
Which line of code properly declares the clothingItem class such that it inherits from Item?
A. Class ClothingItem implements Item{
B. Class ClothingItem {
C. Class ClothingItem super Item {
D. Class ClothingItem extends Item {
Refer to the following code:
01 function Tiger(){
02 this.Type = `Cat';
03 this.size = `large';
04 }
06 let tony = new Tiger();
07 tony.roar = () =>{
08 console.log(`They\'re great1');
09 };
11 function Lion(){
12 this.type = `Cat';
13 this.size = `large';
14 }
16 let leo = new Lion();
17//Insert code here
18 leo.roar();
Which two statements could be inserted at line 17 to enable the function call on line 18?
Choose 2 answers.
A. Leo.roar = () => { console.log(`They\'re pretty good:'); };
B. Object.assign(leo,Tiger);
C. Object.assign(leo,tony);
D. Leo.prototype.roar = () => { console.log(`They\'re pretty good:'); };
A developer wants to set up a secure web serverwith Node.js. The developer creates a directory locally called app-server, and the first file is app-server/index.js Without using any third-party libraries, what should the developer add to index.js to create the secure web server?
A. const https =require(`https');
B. const server =require(`secure-server');
C. const tls = require(`tls');
D. const http =require(`http');
Refer to the code below:
Const searchTest = `Yay! Salesforce is amazing!" ;
Let result1 = searchText.search(/sales/i);
Let result 21 = searchText.search(/sales/i);
console.log(result1);
console.log(result2);
After running this code, which result is displayed on the console?
A. Option A
B. Option B
C. Option C
A developer implements and calls the following code when an application state change occurs:
Const onStateChange =innerPageState) => {
window.history.pushState(newPageState,` ', null);
}
If the back button is clicked after this method is executed, what can a developer expect?
A. A navigate event is fired with a state property that details the previous application state.
B. The page is navigated away from and the previous page in the browser's history is loaded.
C. The page reloads and all Javascript is reinitialized.
D. A popstate event is fired with a state property that details the application's last state.
Refer to the following code:
Which two statement could be inserted at line 17 to enable the function call on line 18? Choose 2 answers
A. Object.assign (leo, tony);
B. Object.assign (leo. Tiger);
C. leo.roar = () => { console.log('They\'re pretty good!'););
D. leo.prototype.roar = ( ) =>( console.log('They\'re pretty good!'); };
A developer wrote a fizzbuzzfunction that when passed in a number, returns the following:
`Fizz' if the number is divisible by 3.
`Buzz' if the number is divisible by 5.
`Fizzbuzz' if the number is divisible by both 3 and 5.
Empty string if the number is divisible by neither3 or 5.
Which two test cases will properly test scenarios for the fizzbuzz function?
Choose 2 answers
A. let res = fizzbuzz(5); console.assert ( res === ` ' );
B. let res = fizzbuzz(15); console.assert ( res === ` fizzbuzz ' )
C. let res = fizzbuzz(Infinity); console.assert ( res === ` ' )
D. let res = fizzbuzz(3); console.assert ( res === ` buzz ' )
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.