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 +

Which two test cases will properly test scenarios for the fizzbuzz function?

A developer wrote a fizzbuzz function that when passed in a number, returns the following: ‘Fizz’ if the number is divisible by 3. ‘Buzz’ if the number is divisible by 5. ‘Fizzbuzz’ if the number is divisible by both 3 and 5. Empty string if the number is divisible by...

February 26, 2022 1 Comment READ MORE +

Which option allows the developer to step into each function execution within calculateBill?

A developer has code that calculates a restaurant bill, but generates incorrect answers while testing the code: function calculateBill ( items ) { let total = 0; total += findSubTotal(items); total += addTax(total); total += addTip(total); return total; } Which option allows the developer to step into each function execution...

February 26, 2022 No Comments READ MORE +

What happens due to lack of the new keyword on line 02?

A developer wants to create an object from a function in the browser using the code below: Function Monster() { this.name = ‘hello’ }; Const z = Monster(); What happens due to lack of the new keyword on line 02?A . The z variable is assigned the correct object.B ....

February 26, 2022 No Comments READ MORE +

Why would a developer specify a package.jason as a developed forge instead of a dependency?

Why would a developer specify a package.jason as a developed forge instead of a dependency?A . It is required by the application in production.B . It is only needed for local development and testing.C . Other required packages depend on it for development.D . It should be bundled when the...

February 26, 2022 No Comments READ MORE +

Which three options show valid methods for creating a fat arrow function? Choose 3 answers

Which three options show valid methods for creating a fat arrow function? Choose 3 answersA . x => ( console.log(‘ executed ’) ; )B . [ ] => ( console.log(‘ executed ’) ;)C . ( ) => ( console.log(‘ executed ’) ;)D . X,y,z => ( console.log(‘ executed ’) ;)E...

February 25, 2022 1 Comment READ MORE +