This course has been updated! We now recommend you take the Complete Intro to Web Development, v3 course.
Transcript from the "An Introduction to Programming" Lesson
[00:02:08] So one-line comments start with two forward slashes at the end. And comments are not code, but can co-exist with code. So they're not executed by the browser, they are only read by humans, so, only meant for yourself or other people, so notes. You can also do multi-line comments and they are a forward slash and a star, what you wanna write, then they are ended with a star and another forward slash.
[00:02:44] If you have syntax highlighting in your editor, you'll see that comments are a different color. So some rule of thumbs about comments, don't try to overuse them in code that you're sharing. So, if you have a really complex piece of code, feel free to comment it, but don't just put comments in willy nilly if other people are going to read it, cuz they should be able to infer what's going on from your code.
[00:03:33] The first way is that super annoying pop up, the second way is we can output directly to the html page, the third way is that we can display it in that console that we talked about in the beginning.