> For the complete documentation index, see [llms.txt](https://devs.gitbook.io/0/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devs.gitbook.io/0/mot-vai-cau-hoi-test-full-stack-engineer-javascript-1.md).

# Một vài câu hỏi test Full-stack engineer (JavaScript)

Chúc các bạn làm bài tốt

## &#x20;1. What is Callback? How do you solve callback hell? <a href="#id-1-what-is-callback-how-do-you-solve-callback-hell" id="id-1-what-is-callback-how-do-you-solve-callback-hell"></a>

## &#x20;2. What is MVC architecture? Please explain the function of each component? <a href="#id-2-what-is-mvc-architecture-please-explain-the-function-of-each-component" id="id-2-what-is-mvc-architecture-please-explain-the-function-of-each-component"></a>

## &#x20;3. Have you ever used AngularJS? What are Angular Directives & Services? <a href="#id-3-have-you-ever-used-angularjs-what-are-angular-directives-and-services" id="id-3-have-you-ever-used-angularjs-what-are-angular-directives-and-services"></a>

## 2. Skill-based Section 1 <a href="#id-2-skill-based-section-1" id="id-2-skill-based-section-1"></a>

var arr1 = "john".split(''); var arr2 = arr1.reverse(); var arr3 = "jones".split(''); arr2.push(arr3); console.log("array 2: length=" + arr2.length + " last=" + arr2.slice(-1)); console.log("array 1: length=" + arr1.length + " last=" + arr1.slice(-1));

### 1. What will the code above output to the console and why <a href="#id-1-what-will-the-code-above-output-to-the-console-and-why" id="id-1-what-will-the-code-above-output-to-the-console-and-why"></a>

### 2. Have you ever used Mongodb? Can you write mongo query to figure out all documents which contain string “AA” in “name” field & “dateCreated” is today? <a href="#id-2-have-you-ever-used-mongodb-can-you-write-mongo-query-to-figure-out-all-documents-which-contain-str" id="id-2-have-you-ever-used-mongodb-can-you-write-mongo-query-to-figure-out-all-documents-which-contain-str"></a>

## &#x20;3. Skill-based Section 2 <a href="#id-3-skill-based-section-2" id="id-3-skill-based-section-2"></a>

&#x20;Ex: Input array: \[1, 2, 3, 4, 4, 5], N = 7 => Output: 3, 4 3, 4

### &#x20;1. Given an array and an integer N, print the all pair of numbers in the array that has sum equal to N. Example above <a href="#id-1-given-an-array-and-an-integer-n-print-the-all-pair-of-numbers-in-the-array-that-has-sum-equal-to-n" id="id-1-given-an-array-and-an-integer-n-print-the-all-pair-of-numbers-in-the-array-that-has-sum-equal-to-n"></a>

### &#x20;2. What’s the complexity of your algorithm on the question above? <a href="#id-2-whats-the-complexity-of-your-algorithm-on-the-question-above" id="id-2-whats-the-complexity-of-your-algorithm-on-the-question-above"></a>

Tài liệu tham khảo:[JavaScript Two Sum: Find All Pairs That Sum to a Target Value - William S. VincentFind all pairs that sum to a target value in a JavaScript array.wsvincent.com](https://wsvincent.com/javascript-two-sum-find-all-pairs-match-target-value/)[Query Documents — MongoDB ManualMongoDB Manual. How do I query documents, query top level fields, perform equality match, query with query operators, specify compound query conditions.docs.mongodb.com](https://docs.mongodb.com/manual/tutorial/query-documents/)

​
