Salesforce.javascript Developer I.v2022!07!10.q70
Salesforce.javascript Developer I.v2022!07!10.q70
q70
NEW QUESTION: 1
Refer to the code below:
let car1 = new Promise((_ ,reject)=> setTimeout(reject,2000,"Car1 crashed in")); let car2 = new
Promise(resolve => setTimeout(resolve,1500,"Car2 completed")); let car3 = new Promise(resolve
=> setTimeout(resolve,3000,"Car3 completed")); Promise.race([car1,car2,car3])
.then(value=>{
let result = `${value} the race.`;
}).catch(err=>{
console.log('Race is cancelled.',err);
});
What is the value of result when promise.race execues?
A. Car2 completed the race.
Answer: (SHOW ANSWER)
NEW QUESTION: 2
A developer has two ways to write a function:
Option A:
function Monster(){
this.growl = ()=>{
console.log('Grr!');
}
}
Option B:
function Monster(){};
Monster.prototype.growl = ()=>{
console.log('Grr!');
}
After deciding on an option, the developer creates 1000 monster objects.
How many growl methods are created with Option A and Option B?
A. 1000 for both
B. 1 for Option A, 1000 for Option B
C. 1 methods for both
D. 1000 for Option A, 1 for Option B
Answer: (SHOW ANSWER)
NEW QUESTION: 3
Refer to the code below:
01 let car1 = new promise((_, reject) =>
02 setTimeout(reject, 2000, "Car 1 crashed in"));
03 let car2 = new Promise(resolve => setTimeout(resolve, 1500, "Car 2
completed"));
04 let car3 = new Promise(resolve => setTimeout (resolve, 3000, "Car 3
Completed"));
05 Promise.race([car1, car2, car3])
06 .then(value => (
07 let result = $(value) the race. `;
08 ))
09 .catch( arr => (
10 console.log("Race is cancelled.", err);
11 ));
What is the value of result when Promise.race executes?
A. Car 3 completed the race.
B. Car 1 crashed in the race.
C. Race is cancelled.
D. Car 2 completed the race.
Answer: (SHOW ANSWER)
NEW QUESTION: 4
Refer to the following code:
What is the output of line 11?
A. ["foo", "bar"]
B. ["foo:1", "bar:2"]
C. ["bar", "foo"]
D. [1,2]
Answer: (SHOW ANSWER)
NEW QUESTION: 5
Refer to following code:
class Vehicle {
constructor(plate) {
This.plate =plate;
}
}
Class Truck extends Vehicle {
constructor(plate, weight) {
//Missing code
This.weight = weight;
}
displayWeight() {
console.log('The truck ${this.plate} has a weight of ${this.weight} lb.');}} Let myTruck = new
Truck('123AB', 5000); myTruck.displayWeight(); Which statement should be added to line 09 for
the code to display 'The truck 123AB has a weight of 5000lb.'?
A. Super.plate =plate;
B. This.plate =plate;
C. Vehicle.plate = plate;
D. super(plate);
Answer: (SHOW ANSWER)
NEW QUESTION: 6
Given the code below:
Setcurrent URL ();
console.log('The current URL is: ' +url );
function setCurrentUrl() {
Url = window.location.href:
What happens when the code executes?
A. The url variable has global scope and line 02 executes correctly.
B. The url variable has local scope and line 02 executes correctly.
C. The url variable has local scope and line 02 throws an error.
D. The url variable has global scope and line 02 throws an error.
Answer: (SHOW ANSWER)
NEW QUESTION: 7
Considering type coercion, what does the following expression evaluate to?
True + '13' + NaN
A. ' 113Nan '
B. ' true13NaN '
C. 14
D. ' true13 '
Answer: (SHOW ANSWER)
NEW QUESTION: 8
Refer to following code block:
Let array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,];
Let output =0;
For (let num of array){
if (output >0){
Break;
}
if(num % 2 == 0){
Continue;
}
Output +=num;
What is the value of output after the code executes?
A. 25
B. 16
C. 11
D. 36
Answer: B (LEAVE A REPLY)
NEW QUESTION: 9
A developer implements a function that adds a few values.
Function sum(num) {
If (num == undefined) {
Num =0;
}
Return function( num2, num3){
If (num3 === undefined) {
Num3 =0 ;
}
Return num + num2 + num3;
}
}
Which three options can the developer invoke for this function to get a return value of 10 ?
Choose 3 answers
A. Sum () (20)
B. sum(10) ()
C. Sum (5, 5) ()
D. sum() (5, 5)
E. sum(5)(5)
Answer: (SHOW ANSWER)
NEW QUESTION: 10
NEW QUESTION: 11
Which statement can a developer apply to increment the browser's navigation history without a
page refresh?
Which statement can a developer apply to increment the browser's navigation history without a
page refresh?
A. window.history.pushStare(newStateObject, ' ', null);
B. window.history.pushState(newStateObject);
C. window.history.state.push(newStateObject);
D. window.history.replaceState(newStateObject,' ', null);
Answer: (SHOW ANSWER)
NEW QUESTION: 12
developer has a web server running with Node.js. The command to start the web server is node
server,js. The web server started having latency issues. Instead of a one second turn around for
web requests, the developer now sees a five second turnaround, Which command can the web
developer run to see what the module is doing during the latency period?
A. NODE_DEBUG =true node server.js
B. DEBUG =true node server.js
C. NODE_DEBUG =http, https node server.js
D. DEBUG = http, https node server.js
Answer: (SHOW ANSWER)
NEW QUESTION: 13
Refer to the code below:
let timeFunction =() => {
console.log('Timer called.");
};
let timerId = setTimeout (timedFunction, 1000);
Which statement allows a developer to cancel the scheduled timed function?
A. removeTimeout(timerId);
B. removeTimeout(timedFunction);
C. clearTimeout(timedFunction);
D. clearTimeout(timerId);
Answer: (SHOW ANSWER)
NEW QUESTION: 14
Refer to the following code:
function test (val) {
If (val === undefined) {
return 'Undefined values!' ;
}
if (val === null) {
return 'Null value! ';
}
return val;
}
Let x;
test(x);
What is returned by the function call on line 13?
A. Line 13 throws an error.
B. 'Null value!'
C. 'Undefined values!'
D. Undefined
Answer: (SHOW ANSWER)
NEW QUESTION: 15
A developer implements and calls the following code when an application state change occurs:
Const onStateChange =innerPageState) => {
window.history.pushState(newPageState, ' ', null);
}
If the back button is clicked after this method is executed, what can a developer expect?
A. The page is navigated away from and the previous page in the browser's history is loaded.
B. The page reloads and all Javascript is reinitialized.
C. A popstate event is fired with a state property that details the application's last state.
D. A navigate event is fired with a state property that details the previous application state.
Answer: (SHOW ANSWER)
NEW QUESTION: 16
A developer has a web server running with Node.js. The command to start the web server is node
server.js. The web server started having latency issues. Instead of a one second turnaround for
web requests, the developer now sees a five second turnaround.
Which command can the web developer run to see what the module is doing during the latency
period?
A. DEBUG=http, https node server.js
B. NODE_DEBUG=http,https node server.js
C. NODE_DEBUG=true node server.js
D. DEBUG=true node server.js
Answer: (SHOW ANSWER)
NEW QUESTION: 17
Refer to the following code that imports a module named utils:
import (foo, bar) from '/path/Utils.js';
foo() ;
bar() ;
Which two implementations of Utils.js export foo and bar such that the code above runs without
error?
Choose 2 answers
A. const foo = () => { return 'foo' ; }
const bar = () => { return 'bar' ; }
export { bar, foo }
B. Export default class {
foo() { return 'foo' ; }
bar() { return 'bar' ; }
}
C. // FooUtils.js and BarUtils.js exist
Import (foo) from '/path/FooUtils.js';
Import (boo) from ' /path/NarUtils.js';
D. const foo = () => { return 'foo';}
const bar = () => {return 'bar'; }
Export default foo, bar;
Answer: (SHOW ANSWER)
NEW QUESTION: 18
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?
A. 01234
B. 02431
C. 02413
D. 13024
Answer: B (LEAVE A REPLY)
NEW QUESTION: 19
Given the code below:
NEW QUESTION: 20
A. runParallel ( ). done(function(data){
return data;
});
B. runParallel () .then(function(data)
return data
C. runParallel () .then(data);
D. Async runParallel () .then(data);
Answer: (SHOW ANSWER)
NEW QUESTION: 21
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 team has already built using HTML, CSS, and JavaScript.
Which three benefits of Node.js can the developer use to persuade their manager?
Choose 3 answers:
A. Executes server-side JavaScript code to avoid learning a new language.
B. Performs a static analysis on code before execution to look for runtime errors.
C. Ensures stability with one major release every few years.
D. Installs with its own package manager to install and manage third-party libraries.
E. Uses non-blocking functionality for performant request handling .
Answer: (SHOW ANSWER)
NEW QUESTION: 22
A developer creates an object where its properties should be immutable and prevent properties
from being added or modified.
Which method should be used to execute this business requirement ?
A. Object.freeze()
B. Object.lock()
C. Object.const()
D. Object.eval()
Answer: (SHOW ANSWER)
NEW QUESTION: 23
A developer copied a JavaScript object:
How does the developer access dan's forstName,lastName? Choose 2 answers
A. dan,firstname ( ) + dan, lastName ( )
B. dan, firstName = dan.lastName
C. dan,name
D. dan,name ( )
Answer: (SHOW ANSWER)
NEW QUESTION: 24
What is the result of the code block?
A. The console logs 'flag' and another flag.
B. The console logs only 'flag'.
C. An error is thrown.
D. The console logs 'flag' and then an error is thrown.
Answer: (SHOW ANSWER)
NEW QUESTION: 25
Refer to the code below:
What is the output of this function when called with an empty array?
A. Return 0
B. Return 5
C. Return NaN
D. Return Infinity
Answer: (SHOW ANSWER)
NEW QUESTION: 26
Refer to the following code:
Let sampleText = 'The quick brown fox jumps';
A developer needs to determine if a certain substring is part of a string.
Which three expressions return true for the given substring ?
Choose 3 answers
A. sampleText.includes(' quick ') !== -1;
B. sampleText.includes('fox');
C. sampleText.includes(' fox ');
D. sampleText.includes(' quick ', 4);
E. sampleText.includes(' Fox ', 3)
Answer: (SHOW ANSWER)
NEW QUESTION: 27
A developer has two ways to write a function:
Option A:
function Monster() {
This.growl = () => {
Console.log ("Grr!");
}
}
Option B:
function Monster() {};
Monster.prototype.growl =() => {
console.log("Grr!");
}
After deciding on an option, the developer creates 1000 monster objects.
How many growl methods are created with Option A Option B?
A. 1 growl method is created for Option A. 1000 growl methods are created for Option B.
B. 1000 growl method is created for Option A. 1 growl methods are created for Option B.
C. 1 growl method is created regardless of which option is used.
D. 1000 growl methods are created regardless of which option is used.
Answer: B (LEAVE A REPLY)
NEW QUESTION: 28
A developer has the following array of student test grades:
Let arr = [ 7, 8, 5, 8, 9 ];
The Teacher wants to double each score and then see an array of the students who scored more
than 15 points.
How should the developer implement the request?
A. Let arr1 = arr.map((num) => num*2). Filter (( val) => val > 15);
B. Let arr1 = arr.map((num) => ( num *2)).filterBy((val) => ( val >15 ));
C. Let arr1 = arr.filter(( val) => ( return val > 15 )) .map (( num) => ( return num *2 ))
D. Let arr1 = arr.mapBy (( num) => ( return num *2 )) .filterBy (( val ) => return val > 15 )) ;
Answer: (SHOW ANSWER)
NEW QUESTION: 29
Given the HTML below:
Which statement adds the priority-account css class to the Applied Shipping row?
A. document.querySelector('#row-as').classList.add('priority-account');
Answer: (SHOW ANSWER)
NEW QUESTION: 30
Answer:
Z is equal to 3.14
Use strict has effect only on line 5.
Line 5 throws an error
NEW QUESTION: 31
Given code below:
setTimeout (() => (
console.log(1);
). 0);
console.log(2);
New Promise ((resolve, reject )) = > (
setTimeout(() => (
reject(console.log(3));
). 1000);
)).catch(() => (
console.log(4);
));
console.log(5);
What is logged to the console?
A. 2 5 1 3 4
B. 1 2 4 3 5
C. 1 2 5 3 4
D. 2 1 4 3 5
Answer: A (LEAVE A REPLY)
NEW QUESTION: 32
A developer writes the code below to return a message to a user attempting to register a new
username. If the username is available, a variable named nag is declared and assigned a value
on line 03.
What is the value of msg when getAvailableabilityMessage ("newUserName") is executed and get
Availability ("newUserName") returns true?
A. "User-name available"
B. undefined
C. "msg is not defined"
D. "newUserName"
Answer: (SHOW ANSWER)
NEW QUESTION: 33
Refer to the code below:
Considering that JavaScript is single-threaded, what is the output of line 08 after the code
executes?
A. 11
B. 13
C. 10
D. 12
Answer: (SHOW ANSWER)
NEW QUESTION: 34
myArraym can have one level, two levels, or more levels.
Which statement flattens myArray when it can be arbitrarily nested?
A. myArray.flat(Infinity);
B. [ ] .concat {. . .myArray) ;
C. myArray. reduce ((prev, curr) => prev.concat(curr) [ ]);
D. myArray. join (","). split (",");
Answer: (SHOW ANSWER)
NEW QUESTION: 35
Refer to the code below:
Which replacement for the conditional statement on line 02 allows a developer to correctly
determine that a specific element, myElement on the page had been clicked?
A. event.target.id =='myElement'
Answer: (SHOW ANSWER)
NEW QUESTION: 36
Given the expressions var1 and var2, what are two valid ways to return the concatenation of the
two expressions and ensure it is string? Choose 2 answers
A. var1 + var2
B. var1.toString ( ) var2.toString ( )
C. string.concat (var1 +var2)
D. String (var1) .concat (var2)
Answer: B,C (LEAVE A REPLY)
NEW QUESTION: 37
Refer to the following array:
Let arr1 = [ 1, 2, 3, 4, 5 ];
Which two lines of code result in a second array, arr2 being created such that arr2 is not a
reference to arr1?
A. Let arr2 = arr1.sort();
B. Let arr2 = arr1.slice(0, 5);
C. Let arr2 = Array.from(arr1);
D. Let arr2 = arr1;
Answer: (SHOW ANSWER)
NEW QUESTION: 38
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
A. Angular
B. Koa
C. Vue
D. Express
Answer: (SHOW ANSWER)
NEW QUESTION: 39
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?
A. 10 -10
B. 10 - 5
C. 5 -5
D. 5 - 10
Answer: (SHOW ANSWER)
NEW QUESTION: 40
NEW QUESTION: 41
Refer to the code below:
for(let number =2 ; number <= 5 ; number += 1 ) {
// insert code statement here
}
The developer 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?
A. console.debug(number % 2 === 0);
B. assert (number % 2 === 0);
C. console.error(number % 2 === 0);
D. console.assert(number % 2 === 0);
Answer: (SHOW ANSWER)
NEW QUESTION: 42
Refer to the code below:
Async funct on functionUnderTest(isOK) {
If (isOK) return 'OK' ;
Throw new Error('not OK');
)
Which assertion accurately tests the above code?
A. Console.assert (await functionUnderTest(true), 'OK')
B. Console.assert (await functionUnderTest(true), ' not OK ')
C. Console.assert (await functionUnderTest(true), ' not OK ')
D. Console.assert (await functionUnderTest(true), ' OK ')
Answer: A (LEAVE A REPLY)
NEW QUESTION: 43
Refer to the code below:
NEW QUESTION: 44
A developer has the function, shown below, that is called when a page loads.
function onload() {
console.log("Page has loaded!");
}
Where can the developer see the log statement after loading the page in the browser?
A. Browser performance toots
B. Terminal running the web server.
C. Browser javaScript console
D. On the webpage.
Answer: (SHOW ANSWER)
NEW QUESTION: 45
Refer to code below:
function Person() {
this.firstName = 'John';
}
Person.prototype ={
Job: x => 'Developer'
};
const myFather = new Person();
const result =myFather.firstName + ' ' + myFather.job();
What is the value of the result after line 10 executes?
A. John Developer
B. Error: myFather.job is not a function
C. Undefined Developer
D. John undefined
Answer: (SHOW ANSWER)
NEW QUESTION: 46
Refer to the string below.
Const str='Salesforce';
Which two statements results in the word 'Sales'?
Answer:
Str.substring(0,5);
Str.substr(0,5);
NEW QUESTION: 47
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?
A. > true > false
B. > 5 > undefined
C. > 5 > -1
D. > 5 > 0
Answer: (SHOW ANSWER)
NEW QUESTION: 48
Refer to the following code:
Which statement should be added to line 09 for the code to display 'The boat has a capacity of 10
people?
A. super.size = size;
B. this.size = size;
C. ship.size size;
D. super (size);
Answer: B (LEAVE A REPLY)
NEW QUESTION: 49
A developer wants to set up a secure web server with Node.js. The developer creates a directory
locally called app-server, and the first file is app-server/index.js Without using any third-party
libraries, what should the developer add to index.js to create the secure web server?
A. const server =require('secure-server');
B. const https =require('https');
C. const tls = require('tls');
D. const http =require('http');
Answer: (SHOW ANSWER)
NEW QUESTION: 50
A. windows,addEventListener('load', personalizeWebsiteContent);
B. windows,addEventListener('DOMContent Loaded ', personalizeWebsiteContent);
C. windows,addEventListener('onload', personalizeWebsiteContent);
D. windows,addEventListener('onDOMCContentLoaded', personalizeWebsiteContent);
Answer: (SHOW ANSWER)
NEW QUESTION: 51
Which three browser specific APIs are available for developers to persist data between page
loads ?
Choose 3 answers
A. Global variables
B. Cookies
C. indexedDB
D. IIFEs
E. localStorage.
Answer: (SHOW ANSWER)
NEW QUESTION: 52
Which code statement below correctly persists an objects in local Storage ?
A. const setLocalStorage = (storageKey, jsObject) => {
window.localStorage.setItem(storageKey, JSON.stringify(jsObject));
}
B. const setLocalStorage = ( jsObject) => {
window.localStorage.connectObject(jsObject));
}
C. const setLocalStorage = ( jsObject) => {
window.localStorage.setItem(jsObject);
}
D. const setLocalStorage = (storageKey, jsObject) => {
window.localStorage.persist(storageKey, jsObject);
}
Answer: (SHOW ANSWER)
NEW QUESTION: 53
Given the following code:
What will be the first four numbers logged?
A. 0123
B. 0112
C. 0122
D. 0012
Answer: (SHOW ANSWER)
NEW QUESTION: 54
Given the code below:
const delay = async delay =>{
return new Promise((resolve,reject)=>{
console.log(1);
setTimeout(resolve,deleay);
});
};
const callDelay = async ()=>{
console.log(2);
const yup = await delay(1000);
console.log(3);
}
console.log(4);
callDelay();
console.log(5);
What is logged to the console?
A. 4 2 1 5 3
Answer: (SHOW ANSWER)
NEW QUESTION: 55
Which three actions can be using the JavaScript browser console?
Choose 3 answers:
A. Run code that is not related to page.
B. view , change, and debug the JavaScript code of the page.
C. View and change DOM the page.
D. Display a report showing the performance of a page.
E. View and change security cookies.
Answer: (SHOW ANSWER)
NEW QUESTION: 56
Why would a developer specify a package.jason as a developed forge instead of a dependency ?
A. It is required by the application in production.
B. It should be bundled when the package is published.
C. It is only needed for local development and testing.
D. Other required packages depend on it for development.
Answer: (SHOW ANSWER)
NEW QUESTION: 57
Refer to code below:
Let productSKU = '8675309' ;
A developer has a requirement to generate SKU numbers that are always 19 characters lon,
starting with 'sku', and padded with zeros.
Which statement assigns the values sku0000000008675309 ?
A. productSKU = productSKU .padStart (19. '0').padstart('sku');
B. productSKU = productSKU .padEnd (16. '0').padstart(19, 'sku');
C. productSKU = productSKU .padStart (16. '0').padstart(19, 'sku');
D. productSKU = productSKU .padEnd (16. '0').padstart('sku');
Answer: (SHOW ANSWER)
NEW QUESTION: 58
Which three actions can be using the JavaScript browser console?
Choose 3 answers:
A. Run code that is not related to page.
B. view , change, and debug the JavaScript code of the page.
C. View and change security cookies.
D. Display a report showing the performance of a page.
E. View and change DOM the page.
Answer: (SHOW ANSWER)
NEW QUESTION: 59
Refer to the following code block:
class Animal{
constructor(name){
this.name = name;
}
makeSound(){
console.log(`${this.name} is making a sound.`)
}
}
class Dog extends Animal{
constructor(name){
super(name)
this.name = name;
}
makeSound(){
console.log(`${this.name} is barking.`)
}
}
let myDog = new Dog('Puppy');
myDog.makeSound();
What is the console output?
A. Puppy is barking
Answer: (SHOW ANSWER)
NEW QUESTION: 60
Refer to the following object.
NEW QUESTION: 62
Refer to the code below:
<html lang="en">
<table onclick="console.log(Table log');">
<tr id="row1">
<td>Click me!</td>
</tr>
<table>
<script>
function printMessage(event) {
console.log('Row log');
}
Let elem = document.getElementById('row1');
elem.addEventListener('click', printMessage, false);
</script>
</html>
Which code change should be made for the console to log only Row log when 'Click me! ' is
clicked?
A. Add.event.stopPropagation(); to window.onLoad event handler.
B. Add event.stopPropagation(); to printMessage function.
C. Add event.removeEventListener(); toprintMessage function.
D. Add event.removeEventListener(); to window.onLoad event handler.
Answer: (SHOW ANSWER)
NEW QUESTION: 63
Which code change should be done for the console to log the following when 'Click me!' is
clicked'
> Row log
> Table log
A. Change line 10 to event.stopPropagation (false) ;
B. Change line 14 to elem.addEventListener ('click', printMessage, true);
C. Remove lines 13 and 14
D. Remove line 10
Answer: (SHOW ANSWER)
NEW QUESTION: 64
Given the following code:
let x = null;
console.log(typeof x);
What is the output?
A. "null"
B. "x"
C. "object"
D. "undefined"
Answer: (SHOW ANSWER)
NEW QUESTION: 65
A developer creates a generic function to log custom messages in the console. To do this, the
function below is implemented.
01 function logStatus(status){
02 console./*Answer goes here*/{'Item status is: %s', status};
03 }
Which three console logging methods allow the use of string substitution in line 02?
A. Assert
B. Error
C. Info
D. Message
E. Log
Answer: (SHOW ANSWER)
NEW QUESTION: 66
Refer to the code below:
01 const server = require('server');
02 /* Insert code here */
A developer imports a library that creates a web server. The imported library uses events and
callbacks to start the servers Which code should be inserted at the line 03 to set up an event and
start the web server ?
A. Server.start ();
B. console.log( 'Listening on ', port) ;
C. server.on(' connect ' , ( port) => {
console.log('Listening on ' , port) ;})
D. server()
E. serve(( port) => (
Answer: (SHOW ANSWER)
NEW QUESTION: 67
Given the HTML below:
Which statement adds the priority-account CSS class to the Universal Containers row?
A. document. getElementByid('row-uc').addClass('priority-account*);
B. document. queryselector('#row-uc').ClassList.add('priority-account');
C. document. querySelectorAll('#row-uc') -classList.add("priority-accour');
D. document. querySelector (#row-uc'). classes-push('priority-account');
Answer: (SHOW ANSWER)
NEW QUESTION: 68
Refer to the following object:
const cat ={
firstName: 'Fancy',
lastName: ' Whiskers',
Get fullName() {
return this.firstName + ' ' + this.lastName;
}
};
How can a developer access the fullName property for cat?
A. cat.function.fullName()
B. cat.get.fullName
C. cat.fullName
D. cat.fullName()
Answer: (SHOW ANSWER)
NEW QUESTION: 69
Given the following code, what is the value of x?
let x = '15' + (10 * 2);
A. 1520
B. 50
C. 35
D. 3020
Answer: (SHOW ANSWER)
NEW QUESTION: 70
A. delay(sayHello, 12000);
B. setInterval(sayHello, 12000);
C. setTimeout(sayHello, 12000);
D. setTimeout(sayHello(), 12000);
Answer: (SHOW ANSWER)