diff --git a/.gitignore b/.gitignore index b666e34b..9e8e29b8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .DS_Store node_modules +.tern-port .settings diff --git a/i18n/troubleshooting.md b/i18n/troubleshooting.md index 7520e155..2bde1d0b 100644 --- a/i18n/troubleshooting.md +++ b/i18n/troubleshooting.md @@ -1,6 +1,6 @@ --- -# O-oh, something isn't working. -# But don't panic! +# O-oh, có điều gì đó không đúng. +# Nhưng đừng hoảng sợ! --- ## Check your solution: diff --git a/problems/for-loop/solution.md b/problems/for-loop/solution.md index b9429ce7..42d49fc6 100644 --- a/problems/for-loop/solution.md +++ b/problems/for-loop/solution.md @@ -1,11 +1,12 @@ --- -# THE TOTAL IS 45 +# Giá trị của biến `total` là 45. -That is a basic introduction to for loops, which are handy in a number of situations, particularly in combination with other data types like strings and arrays. +Bài này chỉ giới thiệu cơ bản về vòng lặp for, nhưng nó sẽ có rất ích trong một số tình huống, đặc biệt là khi xử lý dữ liệu mảng(Array) hoặc xâu chuỗi (String). -In the next challenge we'll start working with **arrays**. -Run `javascripting` in the console to choose the next challenge. +Trong bài tập tiếp theo, chúng ta sẽ bắt đầu làm việc với **arrays**. + +Hãy chạy lênh `javascripting` trên màn hình console để lựa chọn. --- diff --git a/problems/if-statement/solution.md b/problems/if-statement/solution.md index 68c72522..ebf27bce 100644 --- a/problems/if-statement/solution.md +++ b/problems/if-statement/solution.md @@ -2,10 +2,10 @@ # CONDITIONAL MASTER -You got it! The string `orange` has more than five characters. +Bạn đã hiểu rồi đấy! Chuỗi `orange` có nhiều hơn 5 kí tự. -Get ready to take on **for loops** next! +Hãy sẵn sằng để bắt đầu sử dụng **for loops** trong thử thách tiếp theo! -Run `javascripting` in the console to choose the next challenge. +Đừng quên chạy lệnh `javascripting` ở màn hình console để lựa chọn thử thách tiếp theo cho mình. --- diff --git a/problems/introduction/problem.md b/problems/introduction/problem.md index 7266bfb7..32af56d7 100644 --- a/problems/introduction/problem.md +++ b/problems/introduction/problem.md @@ -1,44 +1,24 @@ -To keep things organized, let's create a folder for this workshop. +Sometimes you will need to turn a number into a string. -Run this command to make a directory called `javascripting` (or something else if you like): +In those instances you will use the `.toString()` method. Here's an example: -```bash -mkdir javascripting -``` - -Change directory into the `javascripting` folder: - -```bash -cd javascripting -``` - -Create a file named `introduction.js`: - -```bash -touch introduction.js +```js +var n = 256; +n = n.toString(); ``` -or if you're on windows, -```bash -type NUL > introduction.js -``` -(`type` is part of the command!) +## The challenge: -Open the file in your favorite editor, and add this text: +Create a file named `number-to-string.js`. -```js -console.log('hello'); -``` +In that file define a variable named `n` that references the number `128`; -Save the file, then check to see if your program is correct by running this command: +Call the `.toString()` method on the `n` variable. -```bash -javascripting verify introduction.js -``` +Use `console.log()` to print the results of the `.toString()` method to the terminal. -By the way, throughout this tutorial, you can give the file you work with any name you like, so if you want to use something like `catsAreAwesome.js` file for every exercise, you can do that. Just make sure to run: +Check to see if your program is correct by running this command: ```bash -javascripting verify catsAreAwesome.js +javascripting verify number-to-string.js ``` - diff --git a/problems/introduction/problem_vi.md b/problems/introduction/problem_vi.md new file mode 100644 index 00000000..c71b5a7d --- /dev/null +++ b/problems/introduction/problem_vi.md @@ -0,0 +1,43 @@ +Để giữ những đoạn mã của bạn một cách có tổ chức, hãy tạo một thư mục cho +workshop này. + +Hãy chạy câu lệnh sau để tạo một thư mục tên là `javascripting` (hoặc cái gì +khác nếu bạn thích): + + +```bash +mkdir javascripting +``` + +Di chuyển vào trong thư mục `javascripting`: + +```bash +cd javascripting +``` + +Hãy tạo một tệp tin và đặt tên là `introduction.js`: + +```bash +touch introduction.js +``` + +hoặc nếu như bạn đang dùng windows, +```bash +type NUL > introduction.js +``` + +Hãy mở tệp tin đó bằng trình soạn thảo văn bản yêu thích của bạn và thêm đoạn +mã sau: + + +```js +console.log('hello'); +``` + +Lưu tệp tin lại. Để kiểm tra xem chương trình của bạn có chạy đúng hay không, +hãy chạy lệnh sau: + + +```bash +javascripting verify introduction.js +``` diff --git a/problems/introduction/solution_vi.md b/problems/introduction/solution_vi.md new file mode 100644 index 00000000..ca274afc --- /dev/null +++ b/problems/introduction/solution_vi.md @@ -0,0 +1,21 @@ +--- + +# BẠN LÀM ĐƯỢC RỒI! + + +Bất cứ điều gì ở giữa cặp ngoặc của câu lệnh `console.log()` là được in ra +terminal. + +Vậy nên: + +```js +console.log('hello'); +``` + +sẽ in dòng `hello` ra terminal. + +**string** `hello` đã được in ra trên terminal của bạn. + +Trong phần tiếp theo chúng ta sẽ tìm hiểu về **variables** trong javascript. + +Hãy chạy lệnh `javascripting` để lựa chọn thử thách tiếp theo. diff --git a/problems/number-to-string/solution.md b/problems/number-to-string/solution.md index da079ad0..eb017ab5 100644 --- a/problems/number-to-string/solution.md +++ b/problems/number-to-string/solution.md @@ -1,11 +1,11 @@ --- -# THAT NUMBER IS NOW A STRING! +# SỐ ĐÓ ĐÃ LÀ MỘT CHUỖI! -Excellent. Good work converting that number into a string. +Tuyệt vời. Bạn đã làm tốt công việc chuyển đổi một giá trị kiểu số sang kiểu chuỗi. -In the next challenge we will take a look at **if statements**. +Trong thử thách tiếp theo chúng ta sẽ làm việc với câu lệnh **if statments**. -Run `javascripting` in the console to choose the next challenge. +Chạy lệnh `javascripting-vi` trên màn hình console để chọn các thử thách tiếp theo. --- diff --git a/problems/numbers/solution.md b/problems/numbers/solution.md index 3e990011..8a9c5e55 100644 --- a/problems/numbers/solution.md +++ b/problems/numbers/solution.md @@ -2,10 +2,10 @@ # YEAH! NUMBERS! -Cool, you successfully defined a variable as the number `123456789`. +Tốt lắm, bạn đã định nghĩa thành công một biến với giá trị là số nguyên `123456789`. -In the next challenge we will look at manipulating numbers. +Trong bài tập tiếp theo chúng ta sẽ thao tác với các con số nhiều hơn. -Run `javascripting` in the console to choose the next challenge. +Chạy `javascripting-vi` trên màn hình console để chọn các bài tập tiếp theo. --- diff --git a/problems/revising-strings/solution.md b/problems/revising-strings/solution.md index 5aa91907..6d381d4d 100644 --- a/problems/revising-strings/solution.md +++ b/problems/revising-strings/solution.md @@ -1,11 +1,12 @@ --- # YES, PIZZA _IS_ WONDERFUL. +# VÂNG, PIZZA _is_ WONDERFUL. -Well done, with that `.replace()` method! +Làm tốt lắm, với phương thức `.replace()`! -Next we will explore **numbers**. +Tiếp theo, chúng ta sẽ khám phá **numbers**. -Run `javascripting` in the console to choose the next challenge. +Chạy `javascripting-vi` lệnh trên màn hình console để chọn thử thách tiếp theo. --- diff --git a/problems/rounding-numbers/solution.md b/problems/rounding-numbers/solution.md index 10ea666a..4cc5df6e 100644 --- a/problems/rounding-numbers/solution.md +++ b/problems/rounding-numbers/solution.md @@ -1,11 +1,11 @@ --- -# THAT NUMBER IS ROUNDED +# SỐ ĐÓ ĐÃ ĐƯỢC LÀM TRÒN -Yep, you just rounded the number `1.5` to `2`. Good job. +Vâng, bạn chỉ làm tròn số `1.5` lên `2`. Làm tốt lắm. -In the next challenge we will turn a number into a string. +Trong thử thách lần tới, chúng ta sẽ tìm hiểu cách chuyển một số sang dạng chuỗi. -Run `javascripting` in the console to choose the next challenge. +Chạy lệnh `javascripting-vi` ở màn hình console của bạn để chọn các thử thách tiếp theo. --- diff --git a/problems/string-length/solution.md b/problems/string-length/solution.md index 67a6d0be..db927e80 100644 --- a/problems/string-length/solution.md +++ b/problems/string-length/solution.md @@ -1,9 +1,11 @@ --- -# WIN: 14 CHARACTERS +# YUP: 14 kí tự -You got it! The string `example string` has 14 characters. +Chính xác! Chuỗi `example string` có 14 kí tự. + + +Chạy `javascripting-vi` lệnh trên terminal của bạn để chọn các thử thách tiếp theo. -Run `javascripting` in the console to choose the next challenge. --- diff --git a/problems/strings/solution.md b/problems/strings/solution.md index 69accf89..f114eceb 100644 --- a/problems/strings/solution.md +++ b/problems/strings/solution.md @@ -1,11 +1,11 @@ --- -# SUCCESS. +# THÀNH CÔNG. -You are getting used to this string stuff! +Bạn đã bắt đầu làm quen với chuỗi! -In the next challenges we will cover how to manipulate strings. +Trong thử thách tiếp theo, chúng ta sẽ tìm hiểu làm thế nào để thao tác với các chuỗi. -Run `javascripting` in the console to choose the next challenge. +Chạy lệnh `javascripting-vi` trên màn hình console để chọn thử thách tiếp theo cho mình. --- diff --git a/problems/variables/problem.md b/problems/variables/problem.md index b1474dbc..201b674c 100644 --- a/problems/variables/problem.md +++ b/problems/variables/problem.md @@ -31,3 +31,4 @@ Then use `console.log()` to print the `example` variable to the console. Check to see if your program is correct by running this command: `javascripting verify variables.js` + diff --git a/problems/variables/solution.md b/problems/variables/solution.md index 02fc9361..2dd7e8f7 100644 --- a/problems/variables/solution.md +++ b/problems/variables/solution.md @@ -2,10 +2,10 @@ # YOU CREATED A VARIABLE! -Nice work. +Làm tốt lắm. -In the next challenge we will look at strings more closely. +Trong thử thách tiếp theo, chúng ta sẽ xem xét các chuỗi chặt chẽ hơn. -Run `javascripting` in the console to choose the next challenge. +Hãy chạy lệnh `js-vi` trên màn hình console để chọn thử thách tiếp theo. ---