Salesforce Certified JavaScript Developer I Practice Test - Questions Answers, Page 6
List of questions
Related questions
A class was written to represent items for purchase in an online store, and a second class Representing items that are on sale at a discounted price. THe constructor sets the name to the first value passed in. The pseudocode is below:
Class Item { constructor(name, price) { … // Constructor Implementation
}} Class SaleItem extends Item { constructor (name, price, discount) {
Given the following code:
Let x =('15' + 10)*2;
What is the value of a?
Refer to the following code:
01 function Tiger(){
02 this.Type = 'Cat';
03 this.size = 'large';
04 }
05
06 let tony = new Tiger();
07 tony.roar = () =>{
08 console.log('They\'re great1');
09 };
10
11 function Lion(){
12 this.type = 'Cat';
13 this.size = 'large';
14 }
15
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.
Which statement accurately describes an aspect of promises?
Given the code below:
Function myFunction(){
A =5;
Var b =1;
} myFunction();
console.log(a);
console.log(b);
What is the expected output?
Which two console logs outputs NaN ?
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 to the code below:
Refer to the code below:
Function Person(firstName, lastName, eyecolor) {
this.firstName =firstName;
this.lastName = lastName;
this.eyeColor = eyeColor;
}
Person.job = 'Developer';
const myFather = new Person('John', 'Doe');
console.log(myFather.job);
What is the output after the code executes?
A developer at Universal Containers creates a new landing page based on HTML, CSS, and JavaScript TO ensure that visitors have a good experience, a script named personaliseContext needs to be executed when the webpage is fully loaded (HTML content and all related files ), in order to do some custom initialization.
Which statement should be used to call personalizeWebsiteContent based on the above business requirement?
A developer is leading the creation of a new browser application that will serve a single page application. The team wants to use a new web framework Minimalsit.js. The Lead developer wants to advocate for a more seasoned web framework that already has a community around it.
Which two frameworks should the lead developer advocate for?
Choose 2 answers
Question