Skip to content

Commit

Permalink
update ordered list items to lazy numbering
Browse files Browse the repository at this point in the history
As per style guide, lazy numbering is preferred and is consistent with all other markdown documents.
  • Loading branch information
Churtified committed Jan 16, 2024
1 parent cd6f143 commit 71810da
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions foundations/javascript_basics/fundamentals-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,29 +70,29 @@ The above tutorial mentioned this, but it's important enough to note again: `let
Numbers are the building blocks of programming logic! In fact, it's hard to think of any useful programming task that doesn't involve at least a little basic math... so knowing how numbers work is obviously quite important. Luckily, it's also fairly straightforward.

1. [This W3Schools lesson](https://www.w3schools.com/js/js_arithmetic.asp) followed by [this one](https://www.w3schools.com/js/js_numbers.asp), are good introductions to what you can accomplish with numbers in JavaScript.
2. [This MDN article](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Math) covers the same info from a slightly different point of view, while also teaching you how to apply some basic math in JavaScript. There's much more that you can do with numbers, but this is all you need at the moment.
3. Read through \(and code along with!\) [this article](http://javascript.info/operators) about operators in Javascript. Don't forget to do the "Tasks" at the bottom of the page! It will give you a pretty good idea of what you can accomplish with numbers (among other things!) in JavaScript.
1. [This MDN article](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Math) covers the same info from a slightly different point of view, while also teaching you how to apply some basic math in JavaScript. There's much more that you can do with numbers, but this is all you need at the moment.
1. Read through \(and code along with!\) [this article](http://javascript.info/operators) about operators in Javascript. Don't forget to do the "Tasks" at the bottom of the page! It will give you a pretty good idea of what you can accomplish with numbers (among other things!) in JavaScript.

### Assignment

<div class="lesson-content__panel" markdown="1">
Try the following exercises (and don't forget to use `console.log()`!):

1. Add 2 numbers together! (just type `console.log(23 + 97)` into your html file)
2. Add a sequence of 6 different numbers together.
3. Print the solution to the following equation: `(4 + 6 + 9) / 77`
1. Add a sequence of 6 different numbers together.
1. Print the solution to the following equation: `(4 + 6 + 9) / 77`
- Answer should be approximately `0.24675`
4. Let's use variables!
1. Let's use variables!
- Type this statement at the top of the script tag: `let a = 10`
- In the console `console.log(a)` should print `10`
- Try the following in the console: `9 * a`
- and this: `let b = 7 * a` (returns `undefined` \*) and then `console.log(b)`
5. You should be getting the hang of this by now... try this sequence:
1. You should be getting the hang of this by now... try this sequence:
- Declare a constant variable `MAX` with the value `57`
- Set another variable `actual` to `MAX - 13`
- Set another variable `percentage` to `actual / MAX`
- If you type `percentage` in the console and press <kbd>Enter</kbd> you should see a value like `0.7719`
6. Take a few minutes to keep playing around with various things in your script tag. Eventually, we will learn how to actually make those numbers and things show up on the webpage, but all of this logic will remain the same, so make sure you're comfortable with it before moving on.
1. Take a few minutes to keep playing around with various things in your script tag. Eventually, we will learn how to actually make those numbers and things show up on the webpage, but all of this logic will remain the same, so make sure you're comfortable with it before moving on.

_* As you might have noticed by running Javascript code in the console, the console prints the result of the code it executes (called a return statement). You will learn more about these in the next lessons, however for now it is good to remember that a declaration with an assignment (such as `let b = 7 * a`) returns `undefined` and so you cannot declare and assign a value to a variable and read its value in the same line._
</div>
Expand Down

0 comments on commit 71810da

Please sign in to comment.