Why am I getting an error newDate() not defined ?

var thedate = newDate(1971,11,9);
console.log("This person was born on:", thedate.getDay());

Recommended Answers

Missing space:

var thedate = new Date(1971, 11, 9);
Jump to Post

All 3 Replies

Missing space:

var thedate = new Date(1971, 11, 9);
commented: eagle eye +7

Oh sheesh, programming is like grammer, although they do say syntax errors are the most common.

Thanks.

Siberian, this thread was solved in a blink of pritaes eye, - you should have marked it: "solved" by now.

Regards

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.