welcome-to-js

Studying with LLMs

LLMs exists and can code, we know this. And you will use it, we know this too. So here’s our advice on how to use generative AI when studying Welcome to JS:

Generative AI can write and explain code for you, but writing and explaining code are not the most important skills a developer needs. More importantly, a developer needs to understand a program, its purpose and its context:

… sure, AI can help you answer all of these questions. But you need to know how to ask these questions very clearly otherwise AI will become a crutch, not a tool.

Welcome to JS covers the hidden skills behind understanding, discussing, planning and writing programs. Every learning objective in this module is a skill you should master without the help of AI - you can use AI for help learning each skill, but you have only mastered a skill when you can complete its exercises without AI.

Remember: AI can write code for you, but it can’t understand a program for you.

LLMs are not perfect!

LLMs are useful but they also cause harm. This doesn’t meet you should never use LLMs - it just means you should use them responsibly and be aware of the risks they pose to your own work, to others, and to the environment:


Collaboration Strategies

When you use generative AI, think of it as a collaboration not as a code or explanation generator. You bring your ideas, understanding, and direction to the conversation and the AI will bring some too. But ultimately it’s your responsibility to steer the collaboration to your learning goals. It’s your responsibility to understand how the final code works, make sure is clear, and actually solves the problem you’re working on.

Add Context to your Chats

To help keep your chats with LLMs on topic and limited to Just Enough JavaScript and the DOM I/O library, we suggest you attach these documents to your chat with an LLM, this will work better with some LLMs than with others. If you’re not able to upload the files, you can copy-paste the first one as your first message:

PS. These documents are a work-in-progress. Send us a PR when you find room for improvement!

Start with this Template

Below is a template prompt you can use with or without welcome-to-js.llm-context.md to get your study sessions off to a good start:

I would like to practice <skill>.

By the end of this session, I should able to:
- <learning objective 1>
- ...

Program to use as a practice context:
<paste a program to study OR the LLM will generate one>

Instructions for this session:
- Adjust for individual or group study, supporting peer learning if applicable.
- Tailor difficulty to my comfort level, providing less support as I progress.
- Connect the skill to real-world programming with practical examples.
- Use and explain precise vocabulary related to this skill.
- Guide me through self-assessment strategies.
- Offer alternative explanations and additional practice programs as needed.
- Conclude with open-ended, Socratic-style reflection questions.
- ! Remind me to verify information, as LLMs can make mistakes !

General Strategies

Here are some general tips for collaborating with LLMs when studying:

Specific Strategies

Welcome to JS will also introduce strategies for collaborating with generative AI on specific skills like debugging, documenting, logging, … but only after you have practiced the skill without the help of AI. These strategies are included in each chapter where they fit best.


Suggested Study