Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Wondering if someone can tell me what I'm doing wrong. I'm declaring variables and following the directions, but I keep getting an error that says

Wondering if someone can tell me what I'm doing wrong. I'm declaring variables and following the directions, but I keep getting an error that says I "didn't set the 'timeStamp' to the value 'February 3, 2018 3:15:28 AM'.

Here are the directions:

Variable Declaration

Declare a variable named thisTime containing a Dateobject for February 3, 2018 at 3:15:28 AM.

Use the toLocaleString() method to save the text of the thisTime variable in the timeStr variable.

Change the inner HTML code of the page element with the ID timestamp to the value of the timeStr variable.

Here's my code:

/*

New Perspectives on HTML5 and CSS3, 7th Edition Tutorial 9 Case Problem 1

Planisphere Script Author: XXX Date: XXX

*/ var thisTime = new Date("February 3, 2018 3:15:28 AM"); var timeStr = thisTime.toLocaleString(); document.getElementById("timestamp").innerHTML = timeStr;

Wondering if I'm doing something wrong.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions

Question

=+ Who do you think is right? Why?

Answered: 1 week ago