JavaScript variable can hold different types of data like integer, float, character, string, function, To check what data currently a variable holds, javascript provide typeof operator.

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div id="dv_types"></div>
<script>
        var name = "yourshala";  
	var age = 30;
	var isValid = false;
	var todaysDate = new Date();
	var personInfo = {name:'Mickey',Age:30};
	var fnc = function(){}
	var dv = document.getElementById('dv_types')
	
	dv.innerHTML =	typeof name;
	dv.innerHTML += '<br/>' + typeof age;
	dv.innerHTML += '<br/>' + typeof isValid;
	dv.innerHTML += '<br/>' + typeof todaysDate;
	dv.innerHTML += '<br/>' + typeof personInfo;
	dv.innerHTML += '<br/>' + typeof fnc;
	
}
</script>
</body>
</html>