Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    please help to my code !!

    I am a new user for learning Javascript, i have the problem when i do my exercise. Question :

    Suppose that count is a JavaScript variable and that its value is the number of people who have accessed the current web page. Write a single line of JavaScript code that uses a JavaScript alert to say:

    The number of people who have already visited this page is X

    where X is whatever value count currently has. Thus if the value of count is 4152, the alert would say

    The number of people who have already visited this page is 4152

    My code :

    <!-- hide script from old browsers
    var count;
    count=4152;
    alert("The number of people who have already visited this page is " + count);
    //-->



    The result is :

    Logic or Runtime Errors

    Our Analysis Of Your Code:

    Do not change the count variable.


    It stoped me to do the next exercise, please hple me to make the correction of my code. Thanks a lot.

  • #2
    Regular Coder
    Join Date
    Feb 2004
    Location
    WA
    Posts
    213
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Write a single line of JavaScript code that uses a JavaScript alert to say
    maybe just write
    Code:
    alert("The number of people who have already visited this page is " + count);
    Nobody is Perfect. I am Nobody.

  • #3
    New to the CF scene
    Join Date
    May 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Unit
    maybe just write
    Code:
    alert("The number of people who have already visited this page is " + count);
    Whao..... you are the excellent person, i asked so many people about the question, and nobody can point it out. Thank you so very much.


  •  

    Posting Permissions

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