which two statements results in the array [1,2,3,4,5]?
Refer to the code below let inArray = [[1,2],[3,4,5]]; which two statements results in the array [1,2,3,4,5]? choose 2 answerA . [ ].concat(...inArray); B. [ ].concat.apply(inArray,[ ]); C. [ ].concat([...inArray]) D. [ ].concat.apply([ ],inArray);View AnswerAnswer: A,D
What is the output when executing the code above?
There is a new requirement for a developer to implement a currPrice method that will return the current price of the item or sales. What is the output when executing the code above?A . 50 Uncaught TypeError: saleItem,desrcription is not a function 50 80 B. 50 80 50 72 C....
Which two results occur when running this test on the updated sum3 function?
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 numbers in the array, and the test passes. A different developer made changes to the behavior of sum3 to instead sum only the first...
Consider type coercion, what does the following expression evaluate to?
Consider type coercion, what does the following expression evaluate to? True + 3 + ‘100’ + nullA . 104 B. 4100 C. ‘3100null’ D. ‘4100null’View AnswerAnswer: D
What is the result of executing line 04?
A developer writers the code below to calculate the factorial of a given number. Function factorial(number) { Return number + factorial(number -1); } factorial(3); What is the result of executing line 04?A . 0 B. 6 C. -Infinity D. RuntimeErrorView AnswerAnswer: D
What is the output of the code execution?
At Universal Containers, every team has its own way of copying JavaScript objects. The code snippet shows an Implementation from one team: What is the output of the code execution?A . Hello John Doe B. Hello Dan C. Hello Dan Doe D. SyntaxError: Unexpected token in JSONView AnswerAnswer: D
Which three expressions return the string JavaScript?
Refer to the code declarations below: Which three expressions return the string JavaScript? Choose 3 answersA . Str1.join (str2); B. Str1.concat (str2); C. Concat (str1, str2); D. $(str1) $ (str2} ‘; E. Str1 + str2;View AnswerAnswer: B,D,E
Which two code snippets show working examples of a recursive function? Choose 2 answers
Which two code snippets show working examples of a recursive function? Choose 2 answersA . Let countingDown = function(startNumber) { If ( startNumber >0) { console.log(startNumber) ; return countingDown(startNUmber); } else { return startNumber; }}; B. Function factorial ( numVar ) { If (numVar < 0) return; If ( numVar...
Which line edit should be made to make this code run?
A developer receives a comment from the Tech Lead that the code given below has error: const monthName = ‘July’; const year = 2019; if(year === 2019) { monthName = ‘June’; } Which line edit should be made to make this code run?A . 01 let monthName =’July’; B. 02...
Which three console logging methods allow the use of string substitution in line 02?
A developer creates a generic function to log custom messages in the console. To do this, the function below is implemented. 01 function logStatus(status){ 02 console./*Answer goes here*/{‘Item status is: %s’, status}; 03 } Which three console logging methods allow the use of string substitution in line 02?A . Assert...