Refer to code below:
Let a =’a’;
Let b;
// b = a;
console.log(b);
What is displayed when the code executes?
Refer to code below:
Function muFunction(reassign){
Let x = 1;
var y = 1;
if( reassign ) {
Let x= 2;
Var y = 2;
console.log(x);
console.log(y);}
console.log(x);
console.log(y);}
What is displayed when myFunction(true) is called?
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 the code below:
let o = {
get js() {
let city1 = String("st. Louis");
let city2 = String(" New York");
return {
firstCity: city1.toLowerCase(),
secondCity: city2.toLowerCase(),
}
}
}
What value can a developer expect when referencing o.js.secondCity?
Given the code below:
01 function GameConsole (name) {
02 this.name = name;
03 }
04
05GameConsole.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 . . .
Given the following code:
is the output ofline 02?
Refer to the code declarations below:
Whichthree expressions return the string JavaScript?
Choose 3 answers
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?
Refer to HTML below:
The current status of an Order: In Progress
.Which JavaScript statement changes thetext ‘In Progress’ to ‘Completed’ ?
Given the JavaScript below:
Which code should replace the placeholder comment on line 05 to highlight accounts that match the search string'
PDF + Testing Engine
|
---|
$66 |
Testing Engine
|
---|
$50 |
PDF (Q&A)
|
---|
$42 |
Salesforce Free Exams |
---|
![]() |