UPDATED [Oct 22, 2022] Pass Salesforce Certified JavaScript Developer I Exam Exam with Latest Questions [Q108-Q124]

Share

UPDATED [Oct 22, 2022] Pass Salesforce Certified JavaScript Developer I Exam Exam with Latest Questions

JavaScript-Developer-I Exam Practice Questions prepared by Salesforce Professionals

NEW QUESTION 108
Refer to HTML below:
<div id ="main">
<div id = " card-00">This card is smaller.</div>
<div id = "card-01">The width and height of this card is determined by its contents.</div>
</div>
Which expression outputs the screen width of the element with the ID card-01?

  • A. document.getElementById(' card-01 ').innerHTML.lenght*e
  • B. document.getElementById(' card-01 ').style.width
  • C. document.getElementById(' card-01 ').getBoundingClientRest().width
  • D. document.getElementById(' card-01 ').width

Answer: C

 

NEW QUESTION 109
Refer to the code below:

What is the output of this function when called with an empty array?

  • A. Return NaN
  • B. Return 5
  • C. Return 0
  • D. Return Infinity

Answer: B

 

NEW QUESTION 110
Universal Containers recently its new landing page to host crowd-function campaign. The page uses an external library to display some third-party ads. Once the page is fully loaded, It creates more than 50 new HTML items placed randomly inside the DOM, like the one in the code below.

All the elements included the same ad-library-item class. They are hidden by default, and they are randomly displayed while the user navigation through the page.
Tired of all the ads, what can the developer do to temporarily and quickly remove them?

  • A. Use the browser console to execute a script that prevents the load event to be fired.
  • B. Use the browser console to execute a script that removes all the elements containing the class ad-library-item.
  • C. Use the DOM inspector to prevent the load event to be fired.
  • D. Use the DOM inspector to remove all the elements containing the call ad-library -item.

Answer: B

 

NEW QUESTION 111
Which statement parses successfully?

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

Answer: B

 

NEW QUESTION 112
Refer to the code below:

Line 05 causes an error.
What are the values of greeting and salutation once code completes?

  • A. Greeting is Goodbye and salutation is Hello, Hello.
  • B. Greeting is Hello and salutation is I say hello.
  • C. Greeting is Hello and salutation is Hello, Hello.
  • D. Greeting is Goodbye and salutation is I say Hello.

Answer: C

 

NEW QUESTION 113
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. this.size = size;
  • B. ship.size size;
  • C. super.size = size;
  • D. super (size);

Answer: A

 

NEW QUESTION 114
Refer to the following array:
Let arr = [1, 2, 3, 4, 5];
Which three options result in x evaluating as (3, 4, 5)?
Choose 3 answers

  • A. Let x = arr.filter( (a) => ( a < 2)) ;
  • B. Let x = arr.filter( (a) => )return a > 2 )) ;
  • C. Let x = arr.aplice (2, 3);
  • D. Let x = arr.alice (2) ;
  • E. Let x = arr. Slince (2, 3);

Answer: B,C,D

 

NEW QUESTION 115
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. this.size = size;
  • B. ship.size size;
  • C. super.size = size;
  • D. super (size);

Answer: A

 

NEW QUESTION 116
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 .padEnd (16. '0').padstart(19, 'sku');
  • B. productSKU = productSKU .padEnd (16. '0').padstart('sku');
  • C. productSKU = productSKU .padStart (16. '0').padstart(19, 'sku');
  • D. productSKU = productSKU .padStart (19. '0').padstart('sku');

Answer: C

 

NEW QUESTION 117
Universal Containers (UC) just launched a new landing page, but users complain that the website is slow. A developer found some functions any that might cause this problem. To verify this, the developer decides to execute everything and log the time each of these three suspicious functions consumes.
Which function can the developer use to obtain the time spent by every one of the three functions?

  • A. console. timeLog ()
  • B. console.timeStamp ()
  • C. console.trace()
  • D. console.getTime ()

Answer: A

 

NEW QUESTION 118
Refer to the code below:

What is display when the cod executes?

  • A. ReferenceError: b is not defined
  • B. null
  • C. A
  • D. Undefined

Answer: C

 

NEW QUESTION 119
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 const ( )
  • B. Object. Lock ( )
  • C. Object. real ( )
  • D. Object. filebase ( )

Answer: D

 

NEW QUESTION 120
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?

  • A. [1, 2, 3, 5]
  • B. [1, 2, 3, 4, 4, 5, 4]
  • C. [1, 2, 3, 4, 5, 4, 4]
  • D. [1, 2, 3, 4, 5, 4]

Answer: D

 

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

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

Answer: A,C,D

 

NEW QUESTION 122
The developer wants to test the code:
Const toNumber = (strOrNum) => + strOrNum;
Which two tests are most accurate for this code? Choose 2 answers

  • A. Console.assert (toNumber ('2') === 2 ) ;
  • B. Console,assert (toNumber ( ) === NaN ) ;
  • C. Console,assert (toNumber ( '-3') < 0);
  • D. Console. Assert (Number,isNaN (toNumber ( ) ));

Answer: A,B

 

NEW QUESTION 123
Given the following code, what is the value of x?
let x = '15' + (10 * 2);

  • A. 0
  • B. 1
  • C. 2
  • D. 3

Answer: A

 

NEW QUESTION 124
......

JavaScript-Developer-I Exam Practice Materials Collection: https://www.itpass4sure.com/JavaScript-Developer-I-practice-exam.html

Use Valid New JavaScript-Developer-I Questions - Top choice Help You Gain Success: https://drive.google.com/open?id=13cfs3-a0554SPrfRiCDmjy6aBfzO42Ib