Results 1 to 2 of 2

Thread: I NEED HELP!!!!!!!!!!!!!!!!!!!!!!

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    3

    Exclamation

    I need to make some "programs" in JavaScript...

    1. A program that "calculates" a person age.
    2. A program that "write" the first 50 multiples of 3.

    Also..........

    How can i know if a string is a text or a numeric one?
    How can i "write" text a document already loaded?

    Thanks
    JDGS
    Visual Studio 6 Professional.
    ICQ# 52753120

  2. #2
    Guest
    Code:
    <script>
    function MultipleOf(Num)
    
      {
    
        var OldNum=Num;
    
        for (i=1; i<51; i++)
    
            {
    
                document.write(Num + " ");
    
                Num += OldNum;
    
            }
      }
    
    
    function AgeFromYear(TheYear)
    
      {
    
        var NewYear = 2000 - TheYear;
    
        document.write("you are " + NewYear + " years old");
    
      }
    
    </script>


    [Edited by denniswrenn on 08-13-2000 at 03:36 PM]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width