Skip to content

Commit

Permalink
Merge pull request #301 from turingschool/2410-edits
Browse files Browse the repository at this point in the history
2410 edits
  • Loading branch information
hfaerber authored Oct 7, 2024
2 parents 0d705b3 + d7168fc commit 4d14ad2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
16 changes: 16 additions & 0 deletions module2/lessons/html_fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,22 @@ Take some time to notice the differences between these two codepens:
- [Semantic Page](https://codepen.io/kaylaewood/pen/NWrGqmv)
</section>

<section class="dropdown">
### Common Semantic Elements

<header>
<footer>
<nav>
<main>
<section>
<article>
<aside>

Check out [this MDN page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) for all HTML elements.

</section>


## Refactoring Some HTML

Now that you know what clean, correctly indented HTML looks like, and some of the semantic tags that are available to you, let's take some time to practice.
Expand Down
13 changes: 1 addition & 12 deletions module2/lessons/js_fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,18 +280,6 @@ Expressions rely on operators to calculate their single value. There are 5 basic
4. [Comparison operators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#Comparison_operators) compare two values and return a __true__ or __false__. `var buy = 3 > 5; // Value of buy is false`
5. [Logical operators](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#Logical_operators) combine __expressions__ and return a Boolean value of true or false. `var buy = (5 > 3) && (2 < 4);`

# Statements

A script is a series of instructions that a computer can follow one by one. Each individual instruction is known as a statement. Every line of code we've seen and written today is a statement.

Each statement in JavaScript is followed by a semicolon....sometimes. In JS, the semicolon is often optional and has no impact on the functionality of your code. Some devs love this "freedom", some hate this "inconsistency".

Example statements:

```javascript
console.log('BOOM');
alert('POW');
```

# Functions
Just like methods in Ruby, in JS functions are reusable blocks of code that group statements together to perform a specific task. To create a function, you must give it a name and then write the statements required for the function to achieve its task inside the function's curly braces. Let's work through the pieces and parts of a function.
Expand Down Expand Up @@ -621,6 +609,7 @@ Expressions are parts of our code that get _evaluated_ down to a single value.
<section class="dropdown">
### The "return" keyword lets us get a value from a function when we invoke it.

* Only one value can be returned from a function on any given invocation.
* Once JS runs the `return` statement, the function execution stops and no more code is executed.
* If no return value is specified in a function, it returns "undefined" by default.

Expand Down

0 comments on commit 4d14ad2

Please sign in to comment.