Exam4Training

Which statement assigns the values sku 0000000008675309?

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 sku 0000000008675309?
A . productSKU = productSK
B . padStart (19. ‘0’).padstart(‘sku’);
C . productSKU = productSK
D . padEnd (16. ‘0’).padstart(‘sku’);
E . productSKU = productSK
F . padEnd (16. ‘0’).padstart(19, ‘sku’);
G . productSKU = productSK
H . padStart (16. ‘0’).padstart(19, ‘sku’);

Answer: D

Exit mobile version