JoeViviano / codelab-js-intro

https://github.com
0 stars 1 forks source link

Code Lab Feedback #1

Open JoeViviano opened 8 years ago

JoeViviano commented 8 years ago

Hey @chrisvfritz, can you take a look at this? It's hosted here and meets the following project criteria:

chrisvfritz commented 8 years ago

Looks good! I noticed you put double apostrophes inside the joke to try to simulate quotes, since " is being used to start and end the string. Here's a trick you can use to get actual quotes in your joke:

alert("You can use a backslash to \"escape\" a character in a JavaScript string. This is especially useful when you want to use a character that would otherwise end the string.")

The indentation is also a tiny bit off inside the script tag. This is what I would use instead:

<script>
  function ButtonFunction() {
    alert("What is Donald Trump's position on foreign policy? ''If you mess with the United States, there will be hell toupee.''");
  }
</script>

The opening { and closing } are wrapping the alert, so that's why they're intented on the same level and the alert is indented one level inside it. Does that make sense?

JoeViviano commented 8 years ago

Great! Thanks for the comments, Chris. I've uploaded the revised code to GitHub and the new website can be viewed at alert-space.surge.sh .

chrisvfritz commented 8 years ago

Beautiful!!💥 🎉 :shipit: