JavaScript for WordPress Forums Vanilla JavaScript 1.3.05 – confusion with newContent Reply To: 1.3.05 – confusion with newContent

Zac Gordon

Hi Mike!

Yes, this is a leftover from a different demo that got left in the source code. I will make a note and remove it 🙂

You may also want to rewatch some of the earlier videos in 1.2 where it talks about best practices for writing variables. This is a practice where you name and declare the variable at the top of your code even if you might not assign it a value till later. This way are variables are declared in one place for organization purposes.

We will relook at this when we get to scope a bit later in the course.