Hello All!
I'm brand new to JavaScript, and i've been set the challenge of writing my first program. It's to classify eggs by their size....I've been sat here for about three hours now and cannot see why it won't run. I'm sure i've made an obvious mistake but i just can't see it.....Can someone kindly help?
[HTML]<HTML>
<HEAD>
<TITLE>
Egg sizes
</TITLE>
<SCRIPT LANGUAGE = "JavaScript">
//A Program for classifying eggs by size
var weight;
weight = window.prompt('Please enter the weight of the egg in grams', '');
weight = parseFloat(weight);
if (weight <53)
{
document.write('This egg is small.')
}
else
{
if (weight >= 53) && (weight <63)
{
document.write('This egg is medium.')
}
...[snipped]...
document.write(That was Eggscellent, Thank you for using this program.'
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>[/HTML]