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
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! ’...
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
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...
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 ....
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
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...
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
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
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(‘...