Free Certified JavaScript Developer I Exam Braindumps (page: 16)

Page 15 of 57

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?

  1. ReferenceError: eyeColor is not defined
  2. ReferenceError: assignment to undeclared variable "Person"
  3. Developer
  4. Undefined

Answer(s): D



A developer at Universal Containers creates a new landing page based on HTML, CSS, and JavaScript TO ensure that visitors have a goodexperience, 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 onthe above business requirement?

  1. document.addEventListener(`'onDOMContextLoaded', personalizeWebsiteContext);
  2. window.addEventListener(`load',personalizeWebsiteContext);
  3. window.addEventListener(`onload', personalizeWebsiteContext);
  4. Document.addEventListener(``'DOMContextLoaded' , personalizeWebsiteContext);

Answer(s): B



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

  1. Vue
  2. Angular
  3. Koa
  4. Express

Answer(s): B,D



Universal Containers recently launched its new landing page to host a crowd-funding 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 insidethe DOM, like the one in the code below:



All the elements includes the same ad-library-item class, They are hidden by default, and they are randomly displayed while the user navigates through the page.

  1. Use the DOM inspector to prevent the load eventto be fired.
  2. Use the browser to execute a script that removes all the element containing the class ad-library- item.
  3. Use the DOM inspector to remove all the elements containing the class ad-library-item.
  4. Use the browser console to execute a scriptthat prevents the load event to be fired.

Answer(s): B






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

Exam Discussions & Posts