Hello, Programming!
Welcome! This is your first step into programming, no experience required. We'll use JavaScript, the language that runs in every web browser, so you can try it right here without installing anything.
Reading it line by line
let name = "friend";creates a variable, a named box that holds a value, here the text"friend".console.log(...)prints whatever is inside the parentheses, the most common way to see what your code is doing."Hello, " + name + "!"concatenates (joins) three pieces of text into one:"Hello, ", the value stored inname, and"!".
Try it yourself
Change "friend" to your own name in the code block above, then click Run and watch the output update.
Why variables matter
Without a variable, you'd have to retype "friend" everywhere you wanted to use it. With one, you can change the value in a single place and everything that uses it updates. This idea, storing and reusing values, is the foundation everything else in programming builds on.