Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8288965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:23:46+00:00 2026-06-08T12:23:46+00:00

I am being asked to create a table using javascript that displays simple arithmetic

  • 0

I am being asked to create a table using javascript that displays simple arithmetic of a variable given to me by the user and I’m sure that my syntax is off inside of my document.write, but I’m not sure where and how. My error console says I’m missing a closing ‘)’ at line 18 the end which is not true at all. I saw that in other cases it is frowned upon to use the document.write function for this purpose, but it’s explicitly stated that I should do so as part of the requirements for the completion of this lab, so my sincere apologies for this transgression beforehand.

The code is below – Thanks in advance for any and all help:

<script>  
     var  e1="", e2="", e3="", e4="", e5="", e6="", e7="", e8="", e9="";

    e1 = prompt("Enter your first name in lower case", "");
    var e1u = substr(0, 1);
    e1 = e1u.toUpperCase() + e1.substr(1, e1.length-1);
    e2 = prompt(e1 + ", enter an integer from 1 to 9", "");
    e3 = prompt("Now enter 5 numbers delineated by a comma!", "");
    e4 = prompt("Now enter 3 colors delineated by a comma!");
    e5 = new date();
    e6 = e3.split(',');
    e7 = e4.split(',');
    document.write(""Today's Date = " + e5.getMonth()+1 + "/" + e5.getDay() +
    "/" + e5.getFullYear() + "\n" + "The number in e2 is " + e2 + "\n"
    + "<table><caption>Times Table for the number + e2 + "</caption>"");
    for(var i=0; i<13; i++)
    {
            document.write(""<tr>""<td>" + e2 + "</td>" + "<td>" + i + "</td>" + "<td>" + "=" + "</td>" + "<td>" + (e2 * 1) * i + "</td>""</tr>"");
    }               


</script>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T12:23:47+00:00Added an answer on June 8, 2026 at 12:23 pm

    I fixed the following for you:

    document.write("Today's Date = " + e5.getMonth()+1 + "/" + e5.getDay() +
    "/" + e5.getFullYear() + "\n" + "The number in e2 is " + e2 + "\n"
    + "<table><caption>Times Table for the number" + e2 + "</caption>");
    

    and

    document.write("<tr><td>" + e2 + "</td>" + "<td>" + i + "</td>" + "<td>" + "=" + "</td>" + "<td>" + (e2 * 1) * i + "</td></tr>");
    

    Don’t double up quotations, and use an editor with syntax high-lighting. It will save you a lot of time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working in flashbuilder 4 (flex4?), and am being asked to create the client-side
I need to create a view or a table valued function that returns one
At work we are being asked to create XML files to pass data to
I have been using the following SQL to create a user, login and database.
Im having trouble understanding class relationships after being asked to research it further, would
Discussing with people, asking in interviews, or being asked in interviews, I do not
I'm writting an small game in iPhone, and I'm being asked to add in-game
I have been asked to create import functionality in my application. I am getting
I asked the question this way because I can imagine that there's a potentially
I was asked to create a calendar where certain dates had pop-up windows when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.