PrepAway - Latest Free Exam Questions & Answers

Which two code segments should you include on the webpage?

You develop an HTML5 webpage that contains the following HTML markup:
<input id=”loanTermTextBox” type=”text” />
Users must enter a valid integer value into the text box.
You need to validate the data type that is received from the input element.
Which two code segments should you include on the webpage? (Each correct answer presents a complete
solution. Choose two.)

PrepAway - Latest Free Exam Questions & Answers

A.
Option A

B.
Option B

C.
Option C

D.
Option D

E.
Option E

Explanation:
* parseInt
The parseInt() function parses a string and returns an integer.
Syntax: parseInt(string,radix)
string Required. The string to be parsed
radix Optional. A number (from 2 to 36) that represents the numeral system to be used.
* The isNaN() function determines whether a value is an illegal number (Not-a-Number).
This function returns true if the value is NaN, and false if not.
JavaScript parseInt() Function; JavaScript isNaN() Function


Leave a Reply