From 2d48a4673a77ddb2325453078299b200cb633cd8 Mon Sep 17 00:00:00 2001 From: Yangshun Tay Date: Mon, 13 Apr 2020 05:01:01 +0800 Subject: [PATCH] website: enable other languages --- README.md | 6 +- contents/jp/questions/css-questions.md | 4 +- contents/jp/questions/html-questions.md | 4 +- contents/jp/questions/javascript-questions.md | 116 +++++++++--------- contents/kr/questions/css-questions.md | 4 +- contents/kr/questions/html-questions.md | 4 +- contents/kr/questions/javascript-questions.md | 4 +- contents/pl/questions/css-questions.md | 4 +- contents/pl/questions/html-questions.md | 4 +- contents/pl/questions/javascript-questions.md | 4 +- contents/pr/questions/html-questions.md | 4 +- contents/ru/questions/html-questions.md | 4 +- contents/ru/questions/javascript-questions.md | 4 +- contents/tl/questions/css-questions.md | 4 +- contents/tl/questions/html-questions.md | 4 +- contents/tl/questions/javascript-questions.md | 4 +- website/docusaurus.config.js | 24 ++++ website/sidebars.js | 37 ++++++ 18 files changed, 165 insertions(+), 74 deletions(-) diff --git a/README.md b/README.md index 684044d6b..037a8751e 100644 --- a/README.md +++ b/README.md @@ -46,13 +46,13 @@ You might be interested in the [Tech Interview Handbook](https://yangshun.github ## Contents - [English](/contents/en/README.md) -- [Simplified Chinese (简体中文)](/contents/zh/README.md) - [Japanese (日本語)](/contents/jp/README.md) - [Korean (한국어)](/contents/kr/README.md) +- [Polish (Polski)](contents/pl/README.md) +- [Portuguese (Português)](contents/pr/README.md) - [Russian (Русский)](/contents/ru/README.md) - [Tagalog](/contents/tl/README.md) -- [Polish (Polski)](contents/pl/README.md) -- [Portugese](contents/pr/README.md) +- [Simplified Chinese (简体中文)](/contents/zh/README.md) ## Related diff --git a/contents/jp/questions/css-questions.md b/contents/jp/questions/css-questions.md index 761e67d5f..7d6860fb4 100644 --- a/contents/jp/questions/css-questions.md +++ b/contents/jp/questions/css-questions.md @@ -1,4 +1,6 @@ -# CSS に関する質問 +--- +title: CSS に関する質問 +--- [Front-end Job Interview Questions - CSS Questions](https://github.com/h5bp/Front-end-Developer-Interview-Questions/blob/master/src/questions/css-questions.md) の回答集です。提案や訂正のプルリクエストは大歓迎です! diff --git a/contents/jp/questions/html-questions.md b/contents/jp/questions/html-questions.md index 56588683f..24bbf0047 100644 --- a/contents/jp/questions/html-questions.md +++ b/contents/jp/questions/html-questions.md @@ -1,4 +1,6 @@ -# HTML に関する質問 +--- +title: HTML に関する質問 +--- [Front-end Job Interview Questions - HTML Questions](https://github.com/h5bp/Front-end-Developer-Interview-Questions/blob/master/src/questions/html-questions.md) の回答集です。提案や訂正のプルリクエストは大歓迎です! diff --git a/contents/jp/questions/javascript-questions.md b/contents/jp/questions/javascript-questions.md index 5129384e4..752a05788 100644 --- a/contents/jp/questions/javascript-questions.md +++ b/contents/jp/questions/javascript-questions.md @@ -1,4 +1,6 @@ -# JS に関する質問 +--- +title: JavaScript に関する質問 +--- [Front-end Job Interview Questions - JS Questions](https://github.com/h5bp/Front-end-Developer-Interview-Questions/blob/master/src/questions/javascript-questions.md) の回答集です。提案や訂正のプルリクエストは大歓迎です! @@ -148,7 +150,7 @@ console.log(x); // 1 var foo; console.log(foo); // undefined console.log(foo === undefined); // true -console.log(typeof foo === "undefined"); // true +console.log(typeof foo === 'undefined'); // true console.log(foo == null); // true. Wrong, don't use this to check! @@ -218,7 +220,7 @@ const doubled = a.forEach((num, index) => { ```js const a = [1, 2, 3]; -const doubled = a.map(num => { +const doubled = a.map((num) => { return num * 2; }); @@ -238,7 +240,7 @@ const doubled = a.map(num => { IIFE では、ローカルスコープ内でコードをカプセル化して、その中で宣言された変数がグローバルスコープに漏れないようにすることができます。 ```js -(function() { +(function () { // Some code here. })(); ``` @@ -246,8 +248,8 @@ IIFE では、ローカルスコープ内でコードをカプセル化して、 一度使用され、他の場所で使用する必要がないコールバックです。関数本体を見つけるために他の場所を検索する必要がなく、コードを呼び出すコードの中でハンドラが定義されていると、コードはより自蔵的で読みやすいように見えます。 ```js -setTimeout(function() { - console.log("Hello world!"); +setTimeout(function () { + console.log('Hello world!'); }, 1000); ``` @@ -255,7 +257,7 @@ setTimeout(function() { ```js const arr = [1, 2, 3]; -const double = arr.map(function(el) { +const double = arr.map(function (el) { return el * 2; }); console.log(double); // [2, 4, 6] @@ -303,11 +305,11 @@ function Person(name) { this.name = name; } -var person = Person("John"); +var person = Person('John'); console.log(person); // undefined console.log(person.name); // Uncaught TypeError: Cannot read property 'name' of undefined -var person = new Person("John"); +var person = new Person('John'); console.log(person); // Person { name: "John" } console.log(person.name); // "john" ``` @@ -369,7 +371,7 @@ console.log(add.apply(null, [1, 2])); // 3 機能の検出には、ブラウザが特定のコードブロックをサポートしているかどうか、またそのコードが実行されているかどうかに応じて異なるコードが実行されているかどうかが決まります。例えば: ```js -if ("geolocation" in navigator) { +if ('geolocation' in navigator) { // Can use navigator.geolocation } else { // Handle lack of feature @@ -455,7 +457,7 @@ JSONP は、`