Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Now whether that was five seconds later or five minutes later, we have paused to that point and then we run the next line of code. And that's going to combine the Hello, space, with whatever they typed in using this plus sign to combine these two parts of the message, and then pop-up another dialog box. If I open up this webpage to load it again, there is nothing to actually ensure that somebody types a name here. I could type in a number and click OK and it will just combine that message.
It could have been a number. It could have been a sentence. It could have been nothing at all. If I want to run that code again, I could either close and reopen it or I could click the button in the browser to reload the current page and we'll effectively run the script again. I could even leave that completely blank and click OK. Now here it doesn't matter, but if our program, if our code, was expecting something very specific to work with like a birth date or an amount or an email address, the wrong kind of input could cause it to crash.
Because again programs are all about input and output. There is an old phrase called G-I-G-O, GIGO for Garbage In, Garbage Out, whatever you're asking for, and whatever you get better make sense. Later on we'll see how to do some checking on our input.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 92316 Viewers
82 Video lessons · 104095 Viewers
71 Video lessons · 75479 Viewers
56 Video lessons · 106852 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.