View all detail and faqs for the JavaScript-Developer-I exam
Refer the code below.
x=3.14;
function myfunction() {
"use strict";
y=x;
}
z=x;
myFunction();
developer is trying to convince management that their team will benefit from using
Node.js for a backend server that they are going to create. The server will be a web server that
handles API requests from a website that the teamhas already built using HTML, CSS, and
JavaScript.
Which three benefits of Node.js can the developer use to persuade their manager?
Choose 3 answers:
Refer to the string below.
Const str=’Salesforce’;
Which twostatementsresults in the word 'Sales'?
Given the code below:
const copy = JSON.stringify([ newString(‘ false ’), new Bollean( false ), undefined ]);
What is the value of copy?
What are two unique features of functions defined with a fat arrow as compared to normal function definition?
Choose 2 answers
A developer wants to iterate through an array of objects and count the objects and count
the objects whose property value, name, starts with the letterN.
Const arrObj = [{“name” : “Zach”} , {“name” :“Kate”},{“name” : “Alise”},{“name” : “Bob”},{“name” :
“Natham”},{“name” : “nathaniel”}
Refer to the code snippet below:
01 arrObj.reduce(( acc, curr) => {
02 //missing line 02
02 //missing line 03
04 ). 0);
Which missing lines 02 and 03 return the correctcount?
Refer to code below:
console.log(0);
setTimeout(() => (
console.log(1);
});
console.log(2);
setTimeout(() => {
console.log(3);
), 0);
console.log(4);
In which sequence will the numbers be logged?
Referto the code below:
new Promise((resolve, reject) => {
const fraction = Math.random();
if( fraction >0.5) reject("fraction > 0.5, " + fraction);
resolve(fraction);
})
.then(()=>console.log("resolved"))
.catch((error) => console.error(error))
.finally(() =>console.log(" when am I called?"));

When does Promise.finally on line 08 get called?
Which function should a developer use to repeatedly execute code at a fixed interval ?
Why would a developerspecify apackage.jason as a developed forge instead of a dependency ?