Open yichuandoris opened 7 years ago
Outstanding work, @yichuandoris! Your site works great and the code looks good too.
I have one recommendation to help make your code easier to read. If one line of code is so long that you have to scroll to read the whole line, it's okay to write the code on multiple lines.
For example, this line of code:
response.end('<a href="/">Home</a>' + '<h1>404 Error. Page Not Found!</h1>' + 'The requested URL ' + '<strong>' + request.url + '</strong>' + ' was not found on this server.' + '<p>Thatโs all we know.</p>')
Could be written in multiple lines by moving each string onto its own line, like this:
response.end(
'<a href="/">Home</a>'
+ '<h1>404 Error. Page Not Found!</h1>'
+ 'The requested URL <strong>'
+ request.url
+ '</strong> was not found on this server.'
+ '<p>Thatโs all we know.</p>'
)
Try updating all of your long lines of code like this, then push them to GitHub and I'll take another look.
Thanks! ๐ฆ
Hi Erik, Thanks for the recommendation. I've updated those long lines and git push to GitHub as well as Heroku. Kindly have another look. Thank you. - Doris
Looks good! Thanks for touching that up. :shipit:
@egillespie Can you take a look at this? It's hosted here and meets the following criteria:
h1
element (though for this project, it doesn't have to be a complete HTML page)/
, they see a greeting/random-joke
, they see one of at least three knock-knock jokes (Math.random()
may be useful ๐)/cuteness
, they see a picture of a cute animal (I'm sure you can find one on the Internet ๐)/
) contains a link to it