[QUOTE]
Number 1 and number 2 shows the same result in the browser. I am new to JavaScript I am wondering if the first code is also correct, I code it that and my browser displays the same result as my second code does.
[QUOTE]
This is Number One
[code=html]
<script language =”javascript” type=”text/javascript”>
var adultAnimal;
var youngAnimal;
adultAnimal =”Horse”;
youngAnimal =”Ponny;
document.write(adultAnimal+ ” : ” +youngAnimal);
</script>
[QUOTE]
This is Number Two
[code=html]
<script language =”javascript” type=”text/javascript”>
var adultAnimal;
var youngAnimal;
adultAnimal =”Horse”;
youngAnimal =”Ponny”;
document.write(adultAnimal);
document.write(” : “);
document.write(youngAnimal);
document.write(” : “);
</script>