What kind of export be leverages so that multiple functions can be used?

A developer has an ErrorHandler module that contains multiple functions. What kind of export be leverages so that multiple functions can be used?A . NamedB . AllC . MultiD . DefaultView AnswerAnswer: A

February 28, 2022 No Comments READ MORE +

Which code change should be made for the console to log only Row log when ‘Click me! ’ is clicked?

Refer to the code below: <html lang=”en”> <table onclick=”console.log(Table log’);”> <tr id=”row1”> <td>Click me!</td> </tr> <table> <script> function printMessage(event) { console.log(‘Row log’); } Let elem = document.getElementById(‘row1’); elem.addEventListener(‘click’, printMessage, false); </script> </html> Which code change should be made for the console to log only Row log when ‘Click me! ’...

February 28, 2022 No Comments READ MORE +

Which JavaScript statement changes the text ‘In Progress’ to ‘Completed’?

Refer to HTML below: <p> The current status of an Order: <span id =”status”> In Progress </span> </p>. Which JavaScript statement changes the text ‘In Progress’ to ‘Completed’?A . document.getElementById(“status”).Value = ’Completed’ ;B . document.getElementById(“#status”).innerHTML = ’Completed’ ;C . document.getElementById(“status”).innerHTML = ’Completed’ ;D . document.getElementById(“.status”).innerHTML = ’Completed’ ;View AnswerAnswer: C

February 27, 2022 No Comments READ MORE +

Which two tests are the most accurate for this array?

The developer wants to test the array shown: const arr = Array(5).fill(0) Which two tests are the most accurate for this array? Choose 2 answers:A . console.assert( arr.length === 5 );B . arr.forEach(elem => console.assert(elem === 0)) ;C . console.assert(arr[0] === 0 && arr[ arr.length] === 0);D . console.assert (arr.length...

February 27, 2022 No Comments READ MORE +

What are the values of greeting and salutation once code completes?

Refer to the code below: Line 05 causes an error. What are the values of greeting and salutation once code completes?A . Greeting is Hello and salutation is Hello, Hello.B . Greeting is Goodbye and salutation is Hello, Hello.C . Greeting is Goodbye and salutation is I say Hello.D ....

February 27, 2022 No Comments READ MORE +

Which two console logs outputs NaN? Choose 2 answers

Which two console logs outputs NaN? Choose 2 answersA . console.log(10/ Number(‘5’));B . console.log(parseInt(‘two’));C . console.log(10/ ‘’five);D . console.log(10/0);View AnswerAnswer: B,C

February 27, 2022 No Comments READ MORE +

Based on the code, what must be true about the printPrice function of the PricePrettyPrint module for this import to work?

A developer wants to leverage a module to print a price in pretty format, and has imported a method as shown below: Import printPrice from ‘/path/PricePrettyPrint.js’; Based on the code, what must be true about the printPrice function of the PricePrettyPrint module for this import to work?A . printPrice must...

February 27, 2022 No Comments READ MORE +

Which two tests are most accurate for this code?

The developer wants to test this code: Const toNumber =(strOrNum) => strOrNum; Which two tests are most accurate for this code? Choose 2 answersA . console.assert(toNumber(‘2’) === 2);B . console.assert(Number.isNaN(toNumber()));C . console.assert(toNumber(‘-3’) < 0);D . console.assert(toNumber () === NaN);View AnswerAnswer: A,C

February 26, 2022 No Comments READ MORE +

Which method should be used to execute this business requirement?

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.eval()C . Object.lock()D . Object.freeze()View AnswerAnswer: D

February 26, 2022 No Comments READ MORE +

Which expression outputs the screen width of the element with the ID card-01?

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 ’).getBoundingClientRest().widthB . document.getElementById(‘...

February 26, 2022 No Comments READ MORE +