I was wondering, if I declare an array X in JavaScript and enter a number of elements of different data types and then use the typeof operator as follows:
var X = [2, ‘string’, 3.5];
typeof X;
Will the output be ‘array’? If so how do I identify the data type of the elements of the array? Moreover, typeof identifies all numbers as ‘number’, is there any way I can manipulate this operator or use any other operator to differentiate between an integer and a float number?