Sample Questions of JavaScript-Developer-I Dumps With 100% Exam Passing Guarantee [Q62-Q83]

Share

Sample Questions of JavaScript-Developer-I Dumps With 100% Exam Passing Guarantee

Pass Key features of JavaScript-Developer-I Course with Updated 224 Questions


Salesforce JavaScript-Developer-I certification exam consists of 60 multiple-choice questions that must be completed within 105 minutes. JavaScript-Developer-I exam focuses on a range of topics, including JavaScript fundamentals, Apex, Visualforce, and Lightning components. A passing score of 68% is required to earn the certification.

 

NEW QUESTION # 62
A developer has code that calculates a restaurant bill, but generates incorrect answers while testing the code.

Which option allows the developer to step into each function execution within calculateBill?

  • A. Calling the console. Trace( total ) method on line 03.
  • B. Wrapping findsubtotal in a console .log method.
  • C. Using the debugger command on line 05.
  • D. Using the debugger command on line 03.

Answer: D


NEW QUESTION # 63
A developer wants to create an object from a function in the browser using the code below.
What happens due to lack of the new keyword on line 02?

  • A. The n variable is assigned the correct object but this- remains undefined.
  • B. The a variable is assigned the correct object.
  • C. Window. === name is assigned to ''hello'' and the variable a n remain undefined.
  • D. Window. n is assigned the correct object.

Answer: C


NEW QUESTION # 64
Given the following code:

What will be the first four numbers logged?

  • A. 0122
  • B. 0012
  • C. 0112
  • D. 0123

Answer: A


NEW QUESTION # 65
At Universal Containers, every team has its own way of copying JavaScript objects. The code snippet shows an implementation from one team:

What is the output of the code execution?

  • A. TypeError: dan.name is not a function
  • B. TypeError: Assignment to constant variable
  • C. Hello John Doe
  • D. Hello Dan Doe

Answer: A


NEW QUESTION # 66
Refer to the following code block:

What is the console output?

  • A. > Better student Jackie got 70% on test.
  • B. > Uncaught Reference Error
  • C. > Better student Jackie got 100% on test.
  • D. > Jackie got 70% on test.

Answer: C


NEW QUESTION # 67
Refer to the code below:

What is the value of foobDienu1 after the code executes?

  • A. {'Garlic bread'}
  • B. {'Pizza' , Burger' , French fries ' , garlic bread; }
  • C. {'Pizza' , Burger' , French fries '}
  • D. {'Garlic bread', Pizza' , Burger' , French fries'}

Answer: B


NEW QUESTION # 68
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. Info
  • B. Message
  • C. Assert
  • D. Log
  • E. Error

Answer: A,C,D


NEW QUESTION # 69
developer uses the code below to format a date.

After executing, what is the value offormattedDate?

  • A. June 10, 2020
  • B. May 10, 2020
  • C. November 05, 2020
  • D. October 05, 2020

Answer: A


NEW QUESTION # 70
Which statement accurately describes an aspect of promises?

  • A. .then ( ) manipulates and returns the original promise.
  • B. .Them ( ) cannot be added after a catch.
  • C. In a , them ( ) function, returning results is not necessary since callback will catch the result of a previous promise.
  • D. Agruments for the callback function passed to .then ( ) are optional.

Answer: D


NEW QUESTION # 71
Which three browser specific APIs are available for developers to persist data between page loads ?
Choose 3 answers

  • A. indexedDB
  • B. localStorage.
  • C. Cookies
  • D. IIFEs
  • E. Global variables

Answer: A,B,D


NEW QUESTION # 72
Refer to the code:

Given the code above, which three properties are set pet1?
Choose 3 answers:

  • A. Owner
  • B. canTalk
  • C. Type
  • D. Name
  • E. Size

Answer: B,C,E


NEW QUESTION # 73
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 > 0
  • D. > 5 > -1

Answer: D


NEW QUESTION # 74
Refer to the code below:

What is the value of result when the code executes?

  • A. 5-10
  • B. 5-5
  • C. 10-5
  • D. 10-10

Answer: D


NEW QUESTION # 75
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: A


NEW QUESTION # 76
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: A


NEW QUESTION # 77
Which code statement below correctly persists an object in localStorage?

  • A. Const setlocalstorage = (storagekey, jsObject) => (
    Window. Localstorage.persist (storagekey, jsObject);
    )
  • B. Const setLocalstorage = (jsobject ) => (
    Window .localstorage .setitem (jsobject) ;
  • C. const setLocalstorage = (storageKey , jsobject) => (
    windows. LocalStorage,setitem(storagekey. jSON,string
    )
  • D. const setLocalstorage = (jsobject) =>
    Windows.localstorage.connectobject(jsObject);

Answer: D


NEW QUESTION # 78
Refer to 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?

  • A. When resolved and settled
  • B. WHen resolved
  • C. When resolved or rejected
  • D. When rejected

Answer: C


NEW QUESTION # 79
Given the code below:
01 function GameConsole (name) {
02 this.name = name;
03 }
04
05 GameConsole.prototype.load = function(gamename) {
06 console.log( ` $(this.name) is loading a game : $(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 cartridge game: Super Monic 3x Force . . .

  • A. Console16bit.prototype.load(gamename) {
  • B. Console16bit = Object.create(GameConsole.prototype).load = function
    (gamename) {
  • C. Console16bit.prototype.load = function(gamename) {
  • D. Console16bit.prototype.load(gamename) = function() {

Answer: C


NEW QUESTION # 80
Given the JavaScript below:

Which code should replace the placeholder comment on line 06 to hide accounts that do not match the search string?

  • A. 'Visible : 'hidden'
  • B. 'Block' : 'none'
  • C. 'None' : 'block'
  • D. 'Hidden, visible

Answer: B


NEW QUESTION # 81
A developer has code that calculates a restaurant bill, but generates incorrect answers while testing the code:
function calculateBill ( items ) {
let total = 0;
total += findSubTotal(items);
total += addTax(total);
total += addTip(total);
return total;
}
Which option allows the developer to step into each function execution within calculateBill?

  • A. Using the debugger command on line 03
  • B. Calling the console.trace (total) method on line 03.
  • C. Wrapping findSubtotal in a console.log() method.
  • D. Using the debugger command on line 05.

Answer: D


NEW QUESTION # 82
Which statement parses successfully?

  • A. JSON.parse ('' 'foo'' ');
  • B. JSON.parse (''foo '');
  • C. JSON.parse ('foo ');
  • D. JSON.parse ('' 'foo' '');

Answer: B


NEW QUESTION # 83
......

JavaScript-Developer-I Sample Practice Exam Questions 2025 Updated Verified: https://skillmeup.examprepaway.com/Salesforce/braindumps.JavaScript-Developer-I.ete.file.html