Give You Free Regular Updates on JavaScript-Developer-I Exam Questions May 25, 2023
Achieve the JavaScript-Developer-I Exam Best Results with Help from Salesforce Certified Experts
NEW QUESTION # 118
Given the following code:
is the output of line 02?
- A. ''undefined''
- B. ''object''
- C. ''null'''
- D. ''x''
Answer: B
NEW QUESTION # 119
A developer tries to retrieve all cookies, then sets a certain key value pair in the cookie. These statements are used:
What is the behavior?
- A. A Cookies are read and the key value is set, the remaining cookies are unaffected.
- B. Cookies are read, but the key value is not set because the value is not URL encoded.
- C. Cookies are read and the key value is set, and all cookies are wiped.
- D. Cookies are not read because line 01 should be document, cookies, but the key value is set and all cookies are wiped.
Answer: A
NEW QUESTION # 120
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. leo.prototype.roar = ( ) =>( console.log('They\'re pretty good!'); };
- C. Object.assign (leo. Tiger);
- D. leo.roar = () => { console.log('They\'re pretty good!'); );
Answer: A,D
NEW QUESTION # 121
Refer to the code below:
Which code executes syhello once, two minutes from now?
- A. SetTimeout (sayhello( ), 120000) ;
- B. SetTimeout (sayhello, 120000) ;
- C. SetInterval (sayhello, 120000) ;
- D. delay (sayhello, 120000) ;
Answer: A
NEW QUESTION # 122
Why would a developer specify a package.jason as a developed forge instead of a dependency ?
- A. It should be bundled when the package is published.
- B. It is required by the application in production.
- C. Other required packages depend on it for development.
- D. It is only needed for local development and testing.
Answer: D
NEW QUESTION # 123
Which two code snippets show working examples of a recursive function?
Choose 2 answers
- A. Function factorial ( numVar ) {
If (numVar < 0) return;
If ( numVar === 0 ) return 1;
return numVar -1; - B. Let countingDown = function(startNumber) {
If ( startNumber >0) {
console.log(startNumber) ;
return countingDown(startNUmber);
} else {
return startNumber;
}}; - C. Const sumToTen = numVar => {
If (numVar < 0)
Return;
return sumToTen(numVar + 1)}; - D. Const factorial =numVar => {
If (numVar < 0) return;
If ( numVar === 0 ) return 1;
return numVar * factorial ( numVar - 1 );
};
Answer: B,D
NEW QUESTION # 124
A developer wants to use a module called DataPrettyPrint. This module exports one default function called printDate ().
How can a developer import and use the printDate() function?
A)
B)
C)
D)
- A. Option C
- B. Option D
- C. Option A
- D. Option B
Answer: D
NEW QUESTION # 125
A team that works on a big project uses npm to deal with projects dependencies.
A developer added a dependency does not get downloaded when they execute npm
install.
Which two reasons could be possible explanations for this?
Choose 2 answers
- A. The developer added the dependency as a dev dependency, and
NODE_ENV is set to production. - B. The developer added the dependency as a dev dependency, and
NODE_ENV
Is set to production. - C. The developer missed the option --save when adding the dependency.
- D. The developer missed the option --add when adding the dependency.
Answer: A,B,C
NEW QUESTION # 126
Given the code below:
Const copy = JSON.stringify((new String ('false') , new Bolean(false) undefined)); What is the value of copy?
- A. -- [\''false\'', false, null]" "
- B. -- [ \'false\'', false, undefined]'' ''
- C. -- [\''false\", ()""
- D. --[ false, ()]-
Answer: A
NEW QUESTION # 127
Refer to code below:
Let a ='a';
Let b;
// b = a;
console.log(b);
What is displayed when the code executes?
- A. Null
- B. Undefined
- C. ReferenceError: b is not defined
- D. A
Answer: B
NEW QUESTION # 128
Refer to the code below:
Const myFunction = arr => {
Return arr.reduce((result, current) =>{
Return result = current;
}, 10};
}
What is the output of this function when called with an empty array ?
- A. Returns 10
- B. Returns NaN
- C. Throws an error
- D. Returns 0
Answer: A
NEW QUESTION # 129
Refer the following code
what is the value of array after code executes?
Answer:
Explanation:
[ 1, 2, 3, 5 ]
NEW QUESTION # 130
Which two options are core Node.js modules?
Choose 2 answers
- A. isotream
- B. http
- C. exception
- D. worker
Answer: A,B
NEW QUESTION # 131
Refer to the code below:
Line 05 causes an error.
What are the values of greeting and salutation once code completes?
- A. Greeting is Hello and salutation is Hello, Hello.
- B. Greeting is Hello and salutation is I say hello.
- C. Greeting is Goodbye and salutation is Hello, Hello.
- D. Greeting is Goodbye and salutation is I say Hello.
Answer: A
NEW QUESTION # 132
Refer to the code below:
What is displayed when myfunction(true) is called?
- A. 2 2 1 1
- B. 2 2 undefined undefined
- C. 2 2 1 2
- D. 2 2 2 2
Answer: A
NEW QUESTION # 133
Refer to the code below:
What is the value of result when Promise. race executes?
- A. Car 1 crashed the race
- B. Car 2 completed the race
- C. Race is cancelled.
- D. Car 3 completed the race
Answer: A
NEW QUESTION # 134
A developer is required to write a function that calculates the sum of elements in an array but is getting undefined every time the code is executed. The developer needs to find what is missing in the code below.
Const sumFunction = arr => {
Return arr.reduce((result, current) => {
//
Result += current;
//
), 10);
);
Which option makes the code work as expected?
- A. Replace line 03 with if(arr.length == 0 ) ( return 0; )
- B. Replace line 05 with return result;
- C. Replace line 04 with result = result +current;
- D. Replace line 02 with return arr.map(( result, current) => (
Answer: B
NEW QUESTION # 135
A developer has code that calculates a restaurant bill, but generates incorrect answers while testing the code.
Which option allows the developer to step into each function execution within calculateBill?
- A. Using the debugger command on line 03.
- B. Calling the console. Trace( total ) method on line 03.
- C. Using the debugger command on line 05.
- D. Wrapping findsubtotal in a console .log method.
Answer: A
NEW QUESTION # 136
......
Detailed New JavaScript-Developer-I Exam Questions for Concept Clearance: https://www.real4prep.com/JavaScript-Developer-I-exam.html
Provide JavaScript-Developer-I Practice Test Engine for Preparation: https://drive.google.com/open?id=13CU2ja9RGk0ke1GZAAljwDJi6YGcKI3d