ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 120 - Certified JavaScript Developer I discussion

Report
Export

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 ?

A.
productSKU = productSKU .padStart (19. '0').padstart('sku');
Answers
A.
productSKU = productSKU .padStart (19. '0').padstart('sku');
B.
productSKU = productSKU .padEnd (16. '0').padstart('sku');
Answers
B.
productSKU = productSKU .padEnd (16. '0').padstart('sku');
C.
productSKU = productSKU .padEnd (16. '0').padstart(19, 'sku');
Answers
C.
productSKU = productSKU .padEnd (16. '0').padstart(19, 'sku');
D.
productSKU = productSKU .padStart (16. '0').padstart(19, 'sku');
Answers
D.
productSKU = productSKU .padStart (16. '0').padstart(19, 'sku');
Suggested answer: D
asked 23/09/2024
Sean Kell
45 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first