1. Scope trong javascript là gì?

2. Sự khác nhau giữa var, const và let?

3. Anonymous Functions là gì?

4. Self-Executing Anonymous Functions là gì?

5. Closures trong javascript là gì?

6. Những hàm cơ bản của Array, Function, Object?

7. OOP trong JavaScript: Class, Object, Function, Prototype

8. Promise, bind, call, apply?

9. Event Bubbling, Event Propagation Explained

10. Callback function, Arrow function

11. Strict mode, hoisting, this?

"use strict";
x = 3.14; // This will cause an error

// Non-strict code...
(function(){
"use strict";
// Define your library strictly...
})();
// Non-strict code...

12. Bind(), Call(), Apply()

13. Kiểu dữ liệu: Boolean, Number, String, Object, Array, null, undefined, symbol

14. Angular 2 Two-way Binding

15. Promise & Observable trong Angular?

16. Array function: Map, Reduce, Filter, forEach, find

17. Throttle Function là gì?

18. Debounce function là gì?

19. setTimeout() và setInterval()

20. Dependency Injection trong Angular

21. Unit test code frontend?

22. Lazy loading?

23. Design patterns in JavaScript? Prototype Pattern, Module Pattern, Observer Pattern, Singleton Pattern...

https://toddmotto.com/mastering-the-module-pattern/

24. Callbacks, Promises, Observables and Async/Await

https://www.academind.com/articles/javascript/callbacks-promises-observables-async-await/

25. Array native functions: Map, Filter, Reduce, Some, Every, Find

https://coderwall.com/p/_ggh2w/the-array-native-every-filter-map-some-foreach-methods

https://leanpub.com/javascriptallongesix/read

http://reactivex.io/learnrx/

var task_names = map(tasks, function (task) {
    return task.name;
});
var hasFive = tasks.some(function(number){
    return number === 5;
});
var difficult_tasks = tasks.filter(function (task) {
    return task.duration >= 120;
});
var total = [1, 2, 3, 4, 5].reduce(function (previous, current) {
    return previous + current;
}, 0);
var persons = [
    {id : 1, name : "John", tags : "javascript"},
    {id : 2, name : "Alice", tags : "javascript"},
    {id : 3, name : "Roger", tags : "java"},
    {id : 4, name : "Adam", tags : "javascript"},
    {id : 5, name : "Alex", tags : "java"}
];

var hasJava=persons.some(function(obj){
   return obj.tags.indexOf("java")>-1;
});
console.log(hasJava); //true
var villains = [
    { name: "Brainiac", universe: "DC" },
    { name: "Sinestro", universe: "DC" },
    { name: "Darkseid", universe: "DC" },
    { name: "Joker", universe: "DC" }
];

var everyDC = villains.every(function(universe){
    return universe==="DC";
}
console.log(everyDC); //true

When to use forEach?

.forEach() is great you need to execute a function for each individual element in an array. Good practice is that you should use .forEach() when you can’t use other array methods to accomplish your goal. I know this may sound vague, but .forEach() is a generic tool… only use it when you can’t use a more specialized tool.

When to use map?

.map() when you want to transform elements in an array.

When to use filter?

.filter() when you want to select a subset of multiple elements from an array.

When to use find?

.find() When you want to select a single element from an array.

When to use reduce?

.reduce() when you want derive a single value from multiple elements in an array.

Callback function:
function isSameUniverse(el, index, arr) {
    // The first element doesn't have a predecessor,
    // so don't evaluate it.
    if (index === 0) {
        return true;
    }
    else {
        // Do the universe properties of
        // current and previous elements match?
        return (el.universe === arr[index - 1].universe);
    }
}
console.log(villains.every(isSameUniverse)); //true
Kết quả là bao nhiêu?
((diameter) => diameter * 3.14159265)(1 + 1) //6.2831853