Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: CAN ANYONE HELP ME TO FIGURE OUT WHAT IS MY WRONG?

  1. #1
    Junior Member
    Join Date
    Sep 2017
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CAN ANYONE HELP ME TO FIGURE OUT WHAT IS MY WRONG?

    <!DOCTYPE html>
    <html>
    <head>
    <title>Assignment 1</title>
    <meta charset="utf-8">
    </head>
    <body>

    <div id="mathProblem">
    <!-- leave this div empty!-->
    </div>

    <script>
    var myDiv = document.getElementById("mathProblem");
    //let x = Math.round(math.random() *10);
    let y = Math.round(math.random() *10);
    function myFunction(x,y){
    return x-y;
    };
    // Q: Jamie makes 5 cupcakes and eats 3 of them. How many cupcakes are left? A: 2 !
    myDiv.innerHTML = "mathProblem";
    </script>
    </body>
    </html>

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    On Vacation
    Posts
    21,995
    Thanks
    52
    Thanked 2,364 Times in 2,318 Posts

    Default Re: CAN ANYONE HELP ME TO FIGURE OUT WHAT IS MY WRONG?

    Please post questions about javascript on a javascript forum. This is a java forum
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Can you please help me figure out what's wrong with my code?
    By Edmacelroy in forum What's Wrong With My Code?
    Replies: 10
    Last Post: September 28th, 2013, 05:15 PM
  2. Cannot figure out why this is wrong............
    By gabgab96 in forum What's Wrong With My Code?
    Replies: 6
    Last Post: February 27th, 2013, 05:58 AM
  3. Can't figure out why this is wrong
    By gabgab96 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: February 26th, 2013, 09:25 PM
  4. Can't figure out what's wrong
    By xdx in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 10th, 2012, 08:48 AM
  5. i cannot figure out what's wrong
    By biyuss in forum What's Wrong With My Code?
    Replies: 3
    Last Post: October 17th, 2011, 09:22 PM