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 +

Which two statements result in the array [1, 2, 3, 4, 5]?

Refer to the code below: Let inArray =[ [ 1, 2 ] , [ 3, 4, 5 ] ]; Which two statements result in the array [1, 2, 3, 4, 5]? Choose 2 answersA . [ ]. Concat.apply ([ ], inArray);B . [ ]. Concat (... inArray);C . [ ]....

February 25, 2022 No Comments READ MORE +

What is logged to the console?

Given code below: setTimeout (() => ( console.log(1); ). 0); console.log(2); New Promise ((resolve, reject )) = > ( setTimeout(() => ( reject(console.log(3)); ). 1000); )).catch(() => ( console.log(4); )); console.log(5); What is logged to the console?A . 2 1 4 3 5B . 2 5 1 3 4C ....

February 25, 2022 No Comments READ MORE +

What is displayed when the code executes?

Refer to code below: Let a =’a’; Let b; // b = a; console.log(b); What is displayed when the code executes?A . Reference Error: b is not definedB . AC . UndefinedD . NullView AnswerAnswer: C

February 25, 2022 No Comments READ MORE +

Which missing lines 02 and 03 return the correct count?

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...

February 25, 2022 No Comments READ MORE +

Which two methods are used to address this?

In the browser, the window object is often used to assign variables that require the broadest scope in an application Node.js application does not have access to the window object by default. Which two methods are used to address this? Choose 2 answersA . Use the document object instead of...

February 25, 2022 No Comments READ MORE +