Wednesday, 10 May 2017

Data Types


<html>
<body>
<p id='demo1'></p>
<p id='demo2'></p>
<p id='demo3'></p>
<p id='demo4'></p>
<p id='demo5'></p>
<p id='demo6'></p>

<script>
var a=123e5;
document.getElementById('demo1').innerHTML=a+'it is the value of 123e5';

var b=123e-5;
document.getElementById('demo2').innerHTML=b +'it is the value of 123e-5';

var c=true
document.getElementById('demo3').innerHTML=c+'  this the boolean value c=true'


var car=[1,2,"bmw","vento"];
document.getElementById('demo4').innerHTML='  this is array 1st val   ' + car[0] +"<br>"+' this is sec val   '+car[3];


var person = {fn:'vishnu',ln:'falthoos',age:21};

document.getElementById('demo5').innerHTML=person.fn+'    this is the first object'+'<br><br>'+;


</script>
</body>
</html>

No comments:

Post a Comment