Question 31

In the browser, the window object is often used to assign variables that require the broadcast scope in an application Node is application do not have access to the window object by default.
Which two methods are used to address this? Choose 2 answer
  • Question 32

    Which statement accurately describes an aspect of promises?
  • Question 33

    Refer to the code below:

    What are the value of objBook and newObBook respectively?
  • Question 34

    Given the JavaScript below:
    01 function filterDOM (searchString) {
    02 const parsedSearchString = searchString && searchString.toLowerCase() ;
    03 document.quesrySelectorAll(' .account' ) . forEach(account => (
    04 const accountName = account.innerHTML.toLOwerCase();
    05 account. Style.display = accountName.includes(parsedSearchString) ? /*Insert code*/;
    06 )};
    07 }
    Which code should replace the placeholder comment on line 05 to hide accounts that do not match the search string?
  • Question 35

    At Universal Containers, every team has its own way of copying JavaScript objects. The
    code
    Snippet shows an implementation from one team:
    Function Person() {
    this.firstName = "John";
    this.lastName = 'Doe';
    This.name =() => (
    console.log('Hello $(this.firstName) $(this.firstName)');
    )}
    Const john = new Person ();
    Const dan = JSON.parse(JSON.stringify(john));
    dan.firstName ='Dan';
    dan.name();
    What is the Output of the code execution?