JavaScript-Developer-I試験無料問題集「Salesforce Certified JavaScript Developer I 認定」

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?

Which two options are core Node.js modules?
Choose 2 answers

Given the following code:
Counter = 0;
const logCounter = () => {
console.log(counter);
);
logCounter();
setTimeout(logCOunter, 1100);
setInterval(() => {
Counter++
logCounter();
}, 1000);
What is logged by the first four log statements?

Refer the code below.
x=3.14;
function myfunction() {
"use strict";
y=x;
}
z=x;
myFunction();
正解:
Z is equal to 3.14
Use strict has effect only on line 5.
Line 5 throws an error
Which two code snippets showworking examples of a recursive function?
Choose 2 answers

Refer to the code below:
01 const exec = (item, delay) =>{
02 newPromise(resolve => setTimeout( () => resolve(item), delay)),
03 async function runParallel() {
04 Const (result1, result2, result3) = await Promise.all{
05 [exec ('x', '100') , exec('y', 500), exec('z', '100')]
06 );
07 return `parallel is done: $(result1)$(result2)$(result3)`;
08 }
}
}
Which two statements correctly execute the runParallel () function?
Choose 2 answers

myArraym can have one level, two levels, or more levels.
Which statement flattens myArray when it can be arbitrarily nested?

Refer to the code snippet below:
Let array = [1, 2, 3, 4, 4, 5, 4, 4];
For (let i =0; i <array.length; i++){
if (array[i] === 4) {
array.splice(i, 1);
}
}
What is the value of the array after the code executes?

Refer to the code below:

What is the result when the Promise in the execute function is rejected?

Refer to the code below:
function changeValue(param) {
Param =5;
}
Let a =10;
Let b =5;
changeValue(b);
Const result = a+ " - "+ b;
What is the value of result when code executes?

Refer to code below:
Let a ='a';
Let b;
// b = a;
console.log(b);
What is displayed when the code executes?

Refer to the following code:

What is the output of line 11?

A developer is trying to handle an error within a function.
Which code segment shows the correct approach to handle an error without propagating it elsewhere?