Which code assignment shows a correct way to convert this string to an integer?
Refer to the code below:
Let textValue = ’1984’;
Which code assignment shows a correct way to convert this string to an integer?
A . let numberValue = Number(textValue);
B. Let numberValue = (Number)textValue;
C. Let numberValue = textValue.toInteger();
D. Let numberValue = Integer(textValue);
Answer: A
Latest JavaScript Developer I Practice Questions with 144 Q&As
Updated Study Material | Instant Download | Detailed Answers and Explanations
Subscribe
Login
0 Comments