why does typeof data.cellValue return int value as string??
why does typeof data.cellValue return int value as string??
Addup
Posts: 11Questions: 5Answers: 0
I'm doing and if statement on rowcallback to find the datatype of the cell value and it returns ints as string?
am I missing something?
if (typeof data.cellValue === 'string') {
console.log(data.cellValue +' is '+ typeof data.cellValue ) // returns '181818 is string'
$(row).find('td:eq(1)').css('color', 'orange');
}
else{
$(row).find('td:eq(1)').css('color', 'black');
}
Answers
My guess is that the data is sourced from the DOM or the ajax response has those values as a string.
Kevin
correct int are as "65" etc i figured something already
What do you mean?
Then that is why they are strings instead of integers.
Kevin