Fluent Forever: How to Learn Any Language Fast and Never Forget It
Gabriel Wyner
2021.11.11 ~ ING
25~37/326
-
-
82
1.0 (1.0)
Messenger
Lois Lowry
2021.11.14 ~ ING
1~20/147
MG+
5.0
Messenger는 직전에 읽은 Gathering Blue와 난이도가 거의 비슷한 것 같다. 그리고....내용도 뭔가 비슷하다. The giver도 마찬가지다. 기본적으로 아이들이 주인공이고, 뭔가 갇혀있는 사회를 배경으로 한다. 동일한 작가에 내용도 비슷비슷하다 보니 영어 공부로서의 책 읽기에는 딱 좋은 재료인 것 같다.
Fluent Forever: How to Learn Any Language Fast and Never Forget It
Gabriel Wyner
2021.11.11 ~ ING
12~25/326
-
-
Gathering Blue, Fluent Forever 두 책 모두 잘 읽힌다. 내 영어가 늘어서인지, 내용이 쉬워서 인지 솔직히 조금 헷갈리긴 한다. 특히 Gathering Blue 이 책은 도대체 어떻게 끝나는 것인지 궁금하다. 그동안 접한 적이 없는 독특한 세계관인 것 같다.
// Q1. make a string out of an array
{
const fruits = ["apple", "banana", "orange"];
// di it yourself!
// console.log(fruits.toString()); // .join과 .toString의 차이는 구분자(seperator)
// answer
const result = fruits.join(" and ");
console.log(result);
}
// Q2. make an array out of a string
{
const fruits = "🍎, 🥝, 🍌, 🍒";
// do it yourself!
// const fruit = fruits.split(",");
// console.log(fruit);
// answer
const fruit = fruits.split(",");
console.log(fruit);
}
// Q3. make this array look like this: [5, 4, 3, 2, 1]
{
const array = [1, 2, 3, 4, 5];
// do it yourself!
// const reverseArray = array.reverse();
// console.log(reverseArray);
// answer
const reverseArray = array.reverse();
console.log(reverseArray);
console.log(array); // 원래 배열도 바뀐다.
}
// Q4. make new array without the first two elements
{
const array = [1, 2, 3, 4, 5];
// do it yourself!
// const result = array.slice(2);
// const resultNew = array.slice(2, 5);
// console.log(result);
// console.log(resultNew);
// // answer
const result = array.slice(2, 5);
console.log(result);
console.log(array);
}
// -------------------------------------------------------------
class Student {
constructor(name, age, enrolled, score) {
this.name = name;
this.age = age;
this.enrolled = enrolled;
this.score = score;
}
}
const students = [
new Student("A", 29, true, 45),
new Student("B", 28, false, 80),
new Student("C", 30, true, 90),
new Student("D", 40, false, 66),
new Student("E", 18, true, 88),
];
// Q5. find a student with the score 90
{
// do it yourself!
// for (let i = 0; i < students.length; i++) {
// if (students[i].score === 90) {
// console.log(students[i]);
// }
// }
// answer
// const result = students.find(function (value) {
// return value.score === 90;
// });
const result = students.find((value) => value.score === 90);
console.log(result);
}
// Q6. make an array of enrolled students
{
// do it yourself!
// const result = students.filter((value) => value.enrolled === true);
// console.log(result);
// // answer
const result = students.filter((student) => student.enrolled === true);
console.log(result);
}
// Q7. make an array containing only the students' scores
// result should be: [45, 80, 90, 66, 88]
{
// do it yourself!
// let result = [];
// for (let i = 0; i < students.length; i++) {
// result.push(students[i].score);
// }
// console.log(result);
// answer
const result = students.map((student) => student.score);
console.log(result);
}
// Q8. check if there is a student with the score lower than 50
{
// do it yourself!
// const result = students.some((student) => student.score < 50);
// console.log(result);
// answer
const result = students.some((student) => student.score < 50);
console.log(result);
const result2 = !students.every((student) => student.score >= 50);
console.log(result2);
}
// Q9. compute students' average score
{
//do it yourself!
// let result = 0;
// for (let i = 0; i < students.length; i++) {
// result += students[i].score;
// }
// console.log(result / 5);
// answer
// const result = students.reduce((prev, curr) => {
// console.log("----------");
// console.log(prev);
// console.log(curr);
// return prev + curr.score;
// }, 0);
const result = students.reduce((prev, curr) => prev + curr.score, 0);
console.log(result / students.length);
}
// Q10. make a string containing all the scores
// result should be: '45, 80, 90, 66, 88'
{
// do it yourself!
// const result = students.map((student) => student.score);
// const resultArray = result.join();
// console.log(resultArray);
// answer
const result = students
.map((student) => student.score)
// .filter((score) => score >= 50)
.join();
console.log(result);
}
// Bonus! do Q10 sorted in ascending order
// result should be: '45, 66, 80, 88, 90'
{
// do it yourself!
// const result = students
// .map((student) => student.score)
// .sort((a, b) => a - b)
// .join();
// console.log(result);
// answer
const result = students
.map((student) => student.score)
.sort((a, b) => a - b)
.join();
console.log(result);
}
확실히 원서읽기를 처음 시작했을때 보다는 영어를 언어 자체로 받아들이고 있다는 느낌이 많이 든다. 글을 읽을 때 단어 하나 하나 읽는게 아니라 익숙한 구문끼리 묶어서 읽고 있는걸 발견했기 때문이다. 아마 1000시간쯤 되면 그래도 좀 많이 달라져 있지 않을까 살짝 기대가 된다.
확실히 자기 계발서 같은 non-fiction은 어디서 많이 들어봤던 내용들의 반복이 많다. The Compound Effect도 마찬가지다. 개인적으로 자기 계발서와 같은 책 종류를 좋아하진 않지만, 영어 독서 능력을 기르기에는 좋은 재료 같다는 생각이 든다. 결국 저자가 얘기하고 싶은 핵심은 하나인데 이것을 설명하기 위해 수많은 예제들을 가지고와 살을 붙이니 그 내용들은 어찌 되었든 약간은 비슷할 수밖에 없다. 나도 non-fiction 영어 원서를 많이 읽어본 건 아니라 뭐라 할 말은 없지만, 개인적으로는 영어공부로서의 자기 계발 원서는 추천하고 싶다.
8. 배열 제대로 알고 쓰자. 자바스크립트 배열 개념과 APIs 총정리 | 프론트엔드 개발자 입문편 (JavaScript ES6 )
"use strict";
// Array
// 1. Declaration
const arr1 = new Array();
const arr2 = [];
// 2. Index position
const fruits = ["apple", "banana"];
console.log(fruits);
console.log(fruits.length);
console.log(fruits[0]);
console.log(fruits[1]);
console.log(fruits[2]);
console.log(fruits[fruits.length - 1]);
console.clear();
// 3. Looping over an array
// print all fruits
// a. for
for (let i = 0; i < fruits.length; i++) {
console.log(fruits[i]);
}
// b. for of
for (let fruit of fruits) {
console.log(fruit);
}
// c. for each
// fruits.forEach(function (fruit, index) {
// console.log(fruit, index);
// });
// fruits.forEach((fruit, index) => {
// console.log(fruit, index);
// });
// fruits.forEach((fruit, index) => console.log(fruit, index));
fruits.forEach((fruit) => console.log(fruit));
// 4. Addtion, deletion, copy
// push: add an item to the end
fruits.push("strawberry", "peach");
console.log(fruits);
// pop: remove an item from the end
fruits.pop();
fruits.pop();
console.log(fruits);
// unshift: add an item to the beginning
fruits.unshift("strawberry", "peach");
console.log(fruits);
// shift: remove an item from the beginning
fruits.shift();
fruits.shift();
console.log(fruits);
// note!! shift, unshift are slower than pop, push: 나머지 전체가 움직여야 하기 때문에
// splice: remove an item by index position
fruits.push("strawberry", "peach", "lemon");
console.log(fruits);
fruits.splice(1, 1);
console.log(fruits);
fruits.splice(1, 1, "greenapple", "watermelon");
// fruits.splice(1, 0, "greenapple", "watermelon");
console.log(fruits);
// combine two arrays
const fruits2 = ["coconut", "durian"];
const newFruits = fruits.concat(fruits2);
console.log(newFruits);
// 5. Searching
// indexOf: find the index
console.clear();
console.log(fruits);
console.log(fruits.indexOf("apple"));
console.log(fruits.indexOf("lemon"));
console.log(fruits.indexOf("durian")); // 찾는 값이 없을 경우 -1을 출력
// includes
console.log(fruits.includes("durian"));
console.log(fruits.includes("peach"));
// lastIndexOf
console.clear();
fruits.push("apple");
console.log(fruits);
console.log(fruits.indexOf("apple")); // 첫번째 값의 index만 출력
console.log(fruits.lastIndexOf("apple")); // 마지막 값의 index만 출력