Which code statement correctly retrieves and returns an object from localStorage?
Correct Answer:
C
Which statement phrases successfully?
Correct Answer:
D
What are two unique features of functions defined with a fat arrow as compared to normal function definition?
Choose 2 answers
Correct Answer:
AC
A developer needs to test this function:
01const sum3 = (arr) => (
02if (!arr.length) return 0,
03if (arr.length === 1) return arr[0],
04if (arr.length === 2) return arr[0]+ arr[1],
05 return arr[0] + arr[1] + arr[2],
06 );
Which two assert statements are valid tests for the function? Choose 2 answers
Correct Answer:
AC
Refer to code below:
Let productSKU = ‘8675309’ ;
A developer has a requirement to generate SKU numbers that are always 19 characters lon, starting with ‘sku’,and padded with zeros.
Which statement assigns the values sku0000000008675309 ?
Correct Answer:
D