Free JavaScript-Developer-I Exam Braindumps

Pass your Salesforce Certified JavaScript Developer I exam with these free Questions and Answers

Page 9 of 44
QUESTION 36

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 thedeveloper implement the request?

  1. A. Let arr1 = arr.filter(( val) => ( return val > 15 )) .map (( num) => ( return num *2 ))
  2. B. Let arr1 = arr.mapBy (( num) => ( return num *2 )) .filterBy (( val ) => return val > 15 )) ;
  3. C. Let arr1 = arr.map((num) => num*2). Filter (( val) => val > 15);
  4. D. Let arr1 = arr.map((num) => ( num *2)).filterBy((val) => ( val >15 ));

Correct Answer: C

QUESTION 37

Refer to the expression below: Let x = (‘1’ + 2) == (6 * 2);
How should this expression be modified to ensure that evaluates to false?

  1. A. Let x = (‘1’ + ‘ 2’) == ( 6 * 2);
  2. B. Let x = (‘1’ + 2) == ( 6 * 2);
  3. C. Let x = (1 + 2) == ( ‘6’ / 2);
  4. D. Let x = (1 + 2 ) == ( 6 / 2);

Correct Answer: B

QUESTION 38

In the browser, the window object is often used to assign variables that require the broadest scope in an application Node.js application does not have access to the window object by default.
Which two methods are used to address this ? Choose 2 answers

  1. A. Use the document object instead of the window object.
  2. B. Assign variables to the global object.
  3. C. Create a new window object in the root file.
  4. D. Assign variablesto module.exports and require them as needed.

Correct Answer: B

QUESTION 39

A developer is leading the creation of a new browser application that will serve a single page application. The teamwants 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

  1. A. Vue
  2. B. Angular
  3. C. Koa
  4. D. Express

Correct Answer: BD

QUESTION 40

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?

  1. A. A navigate event is fired with a state property that details the previous application state.
  2. B. The page is navigated away from and the previous page in the browser’s history is loaded.
  3. C. The page reloads and all Javascript is reinitialized.
  4. D. A popstate event is fired with a state property that details the application’s last state.

Correct Answer: B

Page 9 of 44

Post your Comments and Discuss Salesforce JavaScript-Developer-I exam with other Community members: