Question 1

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 2

    A developer is debugging a web server that uses Node.js The server hits a runtimeerror every third request to an important endpoint on the web server.
    The developer added a break point to the start script, that is at index.js at he root of the server's source code. The developer wants to make use of chrome DevTools to debug.
    Which command can be run to access DevTools and make sure the breakdown is hit ?
  • Question 3

    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?
  • Question 4

    A Developer wrote the following code to test a sum3 function that takes in an array of numbers and returns the sum of the first three number in the array, The test passes:
    Let res = sum2([1, 2, 3 ]) ;
    console.assert(res === 6 );
    Res = sum3([ 1, 2, 3, 4]);
    console.assert(res=== 6);
    A different developer made changes to the behavior of sum3 to instead sum all of the numbers present in the array. The test passes:
    Which two results occur when running the test on the updated sum3 function ?
    Choose 2 answers
  • Question 5

    A developer wants to iterate through an array of objects and count the objects and count the objects whose property value, name, starts with the letter N.
    Const arrObj = [{"name" : "Zach"} , {"name" : "Kate"},{"name" : "Alise"},{"name" : "Bob"},{"name" :
    "Natham"},{"name" : "nathaniel"}
    Refer to the code snippet below:
    01 arrObj.reduce(( acc, curr) => {
    02 //missing line 02
    02 //missing line 03
    04 ). 0);
    Which missing lines 02 and 03 return the correct count?