Skip to content

Simple edit to Garbage collection arabic translation #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Jun 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2dec06c
Simple edit to Garbage collection arabic translation
Ahmed-Adel3 Jun 12, 2020
c1fae73
Translate coding styles page to AR
Ahmed-Adel3 Jun 12, 2020
4ee4fd4
Update 1-js/03-code-quality/02-coding-style/1-style-errors/solution.md
Ahmed-Adel3 Jun 12, 2020
797447c
Update 1-js/03-code-quality/02-coding-style/1-style-errors/solution.md
Ahmed-Adel3 Jun 12, 2020
6803364
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
5a6a98b
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
9b9e7a6
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
9e73cd6
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
becd098
Merge branch 'master' into object-basics
3imed-jaberi Jun 12, 2020
bc703d8
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
2c13a15
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
1a50e4f
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
bab1997
Update 1-js/03-code-quality/02-coding-style/1-style-errors/solution.md
Ahmed-Adel3 Jun 12, 2020
66694ad
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
caa3414
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
cef8bc9
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
cfcbc7e
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
0e883b0
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
33ee0e3
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
eb1bc2d
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
290e7c6
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
c360626
Update 1-js/03-code-quality/02-coding-style/1-style-errors/solution.md
Ahmed-Adel3 Jun 12, 2020
189a82c
Update 1-js/03-code-quality/02-coding-style/article.md
Ahmed-Adel3 Jun 12, 2020
a43bcd8
fix last think
3imed-jaberi Jun 17, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions 1-js/03-code-quality/02-coding-style/1-style-errors/solution.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@

You could note the following:
لاحظ التالي:

```js no-beautify
function pow(x,n) // <- no space between arguments
{ // <- figure bracket on a separate line
let result=1; // <- no spaces before or after =
for(let i=0;i<n;i++) {result*=x;} // <- no spaces
// the contents of { ... } should be on a new line
function pow(x,n) // <- لا مسافات بين المعطيات
{ // <- القوس المعقوف في سطر جديد وحده
let result=1; // <- لا مسافة قبل او بعد =
for(let i=0;i<n;i++) {result*=x;} // <- لا مسافة
// المحتوي { ... } يجب ان يكون علي سطر جديد
return result;
}

let x=prompt("x?",''), n=prompt("n?",'') // <-- technically possible,
// but better make it 2 lines, also there's no spaces and missing ;
if (n<0) // <- no spaces inside (n < 0), and should be extra line above it
{ // <- figure bracket on a separate line
// below - long lines can be split into multiple lines for improved readability
let x=prompt("x?",''), n=prompt("n?",'') // <-- ممكن تقنيا,
// ولكن من الأفضل جعلها سطرين ، كما أنه لا توجد مسافات أو مفقودة ;
if (n<0) // <- لا مسافات داخل (n < 0), و يجب ان يكون هنالك سطر فوقه
{ // <- القوس المعقوف في سطر جديد وحده
// أدناه - يمكن تقسيم الخطوط الطويلة إلى خطوط متعددة لتحسين القراءة
alert(`Power ${n} is not supported, please enter an integer number greater than zero`);
}
else // <- could write it on a single line like "} else {"
else // <- يمكن أن يكتب على سطر واحد مثل "} else {"
{
alert(pow(x,n)) // no spaces and missing ;
alert(pow(x,n)) // لا مسافات و مفقودة ;
}
```

The fixed variant:
التصحيح المفضل:

```js
function pow(x, n) {
Expand Down
6 changes: 3 additions & 3 deletions 1-js/03-code-quality/02-coding-style/1-style-errors/task.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ importance: 4

---

# Bad style
# اسلوب سيئ

What's wrong with the code style below?
ما هو الخطأ في اسلوب الكود أدناه؟

```js no-beautify
function pow(x,n)
Expand All @@ -25,4 +25,4 @@ else
}
```

Fix it.
اصلحه.
Loading