The parseInt() method converts the string to a integer. Before applying this function, Ram wants to know the type of the argument that is passed to the function. Which operator in javascript would support this ?
Answer options
A
True
B
False
Correct answer: True
Explanation
The typeof operator in JavaScript returns a string describing the data type of its operand (e.g., 'number', 'string', 'boolean', 'object', 'undefined'). It is used before parseInt() to check the argument type.