-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update dependency and publish newsletters
- Loading branch information
1 parent
c0f1cd6
commit d849a4a
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# [Coding](vuejs.md) | ||
|
||
* New: Sum up the VueJS tutorial. | ||
|
||
## [Javascript](javascript.md) | ||
|
||
* New: Use ternary conditional operator. | ||
|
||
It's defined by a condition followed by a question mark `?`, then an | ||
expression to execute if the condition is truthy followed by a colon `:`, and | ||
finally the expression to execute if the condition is falsy. | ||
|
||
`condition ? exprIfTrue : exprIfFalse` | ||
|
||
```javascript | ||
function getFee(isMember) { | ||
return (isMember ? '$2.00' : '$10.00'); | ||
} | ||
|
||
console.log(getFee(true)); | ||
// expected output: "$2.00" | ||
|
||
console.log(getFee(false)); | ||
// expected output: "$10.00" | ||
|
||
console.log(getFee(null)); | ||
// expected output: "$10.00" | ||
``` | ||
|
||
* New: [Filter the contents of an array.](javascript.md#filter-the-contents-of-an-array) | ||
|
||
The `filter()` method creates a new array filled with elements that pass a test | ||
provided by a function. | ||
|
||
The `filter()` method does not execute the function for empty elements. | ||
|
||
The `filter()` method does not change the original array. | ||
|
||
For example: | ||
|
||
```javascript | ||
const ages = [32, 33, 16, 40]; | ||
const result = ages.filter(checkAdult); | ||
|
||
function checkAdult(age) { | ||
return age >= 18; | ||
} | ||
``` | ||
|
||
* New: [Interacting with HTML.](javascript.md#interacting-with-html) | ||
|
||
# Arts | ||
|
||
## [Book Binding](book_binding.md) | ||
|
||
* New: Introduce book binding. | ||
|
||
[Book binding](https://en.wikipedia.org/wiki/Bookbinding) is the process of | ||
physically assembling a book of codex format from an ordered stack of paper | ||
sheets that are folded together into sections called signatures or sometimes | ||
left as a stack of individual sheets. Several signatures are then bound together | ||
along one edge with a thick needle and sturdy thread. |