?
Solved

how old are you

Posted on 2011-02-24
6
Medium Priority
?
373 Views
Last Modified: 2012-05-11
     Hallo,
      
      
      
      the code should give how old someone is but it doesent work i have done everything i know
      
      Thanks
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<title>Ahmadi Mohsen oefening 3</title>
	</head>
	<body>
		
		<script type="text/javascript">
		name = prompt("your last name");
		
		document.write( "Welkom " + name );
        </script>
		
		<script type="text/javascript">
		fname = prompt("your first name");
		yeardate = parseInt (prompt("geef uw geboortedatum"));
		year= 2010-yeardate
		alert(fname + " you are " + year + " years!"  );
		
		
		</script>

	</body>
	

</html>

Open in new window

0
Comment
Question by:kensy11
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 10

Accepted Solution

by:
aboo_s earned 1500 total points
ID: 34969016
Well I tried your code and it told how old I am !

What seems to be the problem!?
0
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 34969030
i am getting the correct output here

Which browser are you trying with and what is the expected output?
0
 

Author Comment

by:kensy11
ID: 34969092
ooh im sorry i got it wrong but thanks
0
 
LVL 47

Expert Comment

by:for_yan
ID: 34969144
It actually works.
I copied it into file with .html extension (attachemnt)
if you open it in
the browser (or just save it and double-click on your PC) it asks name, last name and age and then determines
the date of birth
try.html
0
 
LVL 10

Expert Comment

by:aboo_s
ID: 34976834
This guy had me check his code and confirm it's working and then just take off with no points awarded!

This does not look too good!
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month11 days, 3 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question