AI Usage Guide - Lesson 3
When to Use AI Today
Good Uses
- Ask AI to explain an error message
- Ask AI what a piece of code does
- Ask AI why your code isn't working (share the error!)
- Ask AI to explain JavaScript concepts
Examples of Good Questions
- "What does 'SyntaxError: Unexpected token' mean?"
- "Why does JavaScript care about capitalization?"
- "What's the difference between single quotes and double quotes in JavaScript?"
- "My code says 'undefined' - what does that mean?"
Avoid Using AI For
- Don't ask AI to write the code for you
- Type every line yourself
- The goal is to understand how code runs, not to finish fastest
AI Ethos for This Session
Today is about understanding how code executes. This is foundational - everything else builds on it.
When you hit an error:
- Read the error message
- Look at the line number it mentions
- Compare your code to the examples
- Then ask AI if still stuck
Errors are learning opportunities, not failures.
Concepts to Understand (Not Just Memorize)
By end of today, you should be able to explain:
- Why code runs top to bottom
- What
console.log()does - Why spelling and syntax matter
- What comments are for
Common Mistakes to Watch For
// Missing closing quote
console.log("Hello);
// Misspelled console
consol.log("Hello");
// Missing parenthesis
console.log("Hello";
// Using wrong quotes (curly quotes from Word/docs)
console.log("Hello"); // These curly quotes won't work!
If your code doesn't work, check for these first!