mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(curriculum): improve code examples in greeting bot workshop (#59763)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ In the lecture videos, you learned how to work with string concatenation using t
|
||||
```js
|
||||
let firstName = "John";
|
||||
|
||||
"Hello, my name is " + firstName + ".";
|
||||
console.log("Hello, my name is " + firstName + ".");
|
||||
// result: "Hello, my name is John."
|
||||
```
|
||||
|
||||
|
||||
+2
-2
@@ -10,11 +10,11 @@ dashedName: step-9
|
||||
In the previous lecture videos, you learned how to reassign values to variables like this:
|
||||
|
||||
```js
|
||||
// name holds the value "John"
|
||||
let name = "John";
|
||||
console.log(name); // "John"
|
||||
|
||||
// name now holds the value "Jane"
|
||||
name = "Jane";
|
||||
console.log(name); // "Jane"
|
||||
```
|
||||
|
||||
Using reassignment, assign the string `"professorBot"` to the `bot` variable.
|
||||
|
||||
Reference in New Issue
Block a user