Comparing values
Given two inputs, return true if both have the same values, regardless of the data type. Otherwise false.
Sample Code:
function compVal(inp1,inp2) {
// Enter your logic here...
}
Examples:
Input: 3.142,'3.142'
Output: true
Explanation: Javascript will convert both values to the same data types before comparison.
Input: '',0
Output: true
Explanation: Empty string has been converted to zero before comparison.