Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions problems/variables/problem.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@ A variable is a name that can reference a specific value. Variables are declared
Here's an example:

```js
var example;
let example;
```

The above variable is **declared**, but it isn't defined (it does not yet reference a specific value).

Here's an example of defining a variable, making it reference a specific value:

```js
var example = 'some string';
let example = 'some string';
```

# NOTE

A variable is **declared** using `var` and uses the equals sign to **define** the value that it references. This is colloquially known as "Making a variable equal a value".
A variable is **declared** using `let` and uses the equals sign to **define** the value that it references. This is colloquially known as "Making a variable equal a value".

Also, `let` is a limited scoped variable and is available inside the scope of the block, expression or statement where it is used.

## The challenge:

Expand Down
2 changes: 1 addition & 1 deletion solutions/variables/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
var example = 'some string';
let example = 'some string';
console.log(example);