diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions/index.md index cf6501b9a55..004f129a12a 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions/index.md @@ -20,10 +20,11 @@ localeTitle: استخدم Arrow Functions لكتابة الدالات المجه ## حل - `const magic = () => { - "use strict"; - return new Date(); - }; -` +```javascript +const magic = () => { + "use strict"; + return new Date(); +}; +``` طالما أنك تخلصت من الكلمة الرئيسية `var` ، فأنت جيد. \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-class-syntax-to-define-a-constructor-function/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-class-syntax-to-define-a-constructor-function/index.md index e0451d06ffe..32c566f2174 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-class-syntax-to-define-a-constructor-function/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-class-syntax-to-define-a-constructor-function/index.md @@ -18,18 +18,19 @@ localeTitle: استخدم بناء جملة class لتعريف دالة منشئ ## حل: - `function makeClass() { - "use strict"; - /* Alter code below this line */ - class Vegetable { - constructor(name){ - this.name = name; - } - } - /* Alter code above this line */ - return Vegetable; - } -` +```javascript +function makeClass() { + "use strict"; + /* Alter code below this line */ + class Vegetable { + constructor(name){ + this.name = name; + } + } + /* Alter code above this line */ + return Vegetable; +} +``` \======= diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-nested-objects/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-nested-objects/index.md index b2e8b961131..2df3350b054 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-nested-objects/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-nested-objects/index.md @@ -12,5 +12,6 @@ localeTitle: استخدم Destructuring Assignment لتعيين متغيرات هنا هو الحل رمز: - `const { tomorrow: { max: maxOfTomorrow } } = forecast; -` \ No newline at end of file +```javascript +const { tomorrow: { max: maxOfTomorrow } } = forecast; +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects/index.md index 915d6b91994..75b3aebfa6f 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects/index.md @@ -12,10 +12,11 @@ localeTitle: استخدم Destructuring Assignment لتعيين متغيرات # إعادة تعيين خصائص باستخدام deconstruction. - `var basicOjb = {x: 40}; - //To reassign 'get the value of the x property of basicObj and place its value into bigX' in ES6: - const { x: bigX } = basicOjb; - consle.log(bigX) // ans = 40 -` +```javascript +var basicOjb = {x: 40}; +//To reassign 'get the value of the x property of basicObj and place its value into bigX' in ES6: +const { x: bigX } = basicOjb; +consle.log(bigX) // ans = 40 +``` ضع قيمة الخاصية الطول 'str' في len. \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-pass-an-object-as-a-functions-parameters/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-pass-an-object-as-a-functions-parameters/index.md index 63fbcc3c58f..afedc580795 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-pass-an-object-as-a-functions-parameters/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-pass-an-object-as-a-functions-parameters/index.md @@ -14,18 +14,19 @@ localeTitle: استخدم Destructuring Assignment لتمرير كائن كمع ## الحل 1: - `const half = (function() { - "use strict"; // do not change this line - - // change code below this line - return function half({max, min}) { - // use function argument destructuring - return (max + min) / 2.0; - }; - // change code above this line - - })(); -` +```javascript +const half = (function() { + "use strict"; // do not change this line + + // change code below this line + return function half({max, min}) { + // use function argument destructuring + return (max + min) / 2.0; + }; + // change code above this line + +})(); +``` لاحظ أننا ندمر `stats` لتمرير اثنين من صفاتها - `max` `min` - إلى الوظيفة. لا تنس تعديل بيان الإرجاع الثاني. تغيير `stats.max` إلى `max` ، وتغيير `stats.min` إلى `min` فقط. @@ -33,15 +34,16 @@ localeTitle: استخدم Destructuring Assignment لتمرير كائن كمع هنا هو حل آخر يعمل. ليس الكثير من الاختلاف ، بخلاف حقيقة أن الوظيفة لا تملك اسمًا. - `const half = (function() { - "use strict"; // do not change this line - - // change code below this line - return (({max, min}) => { - // use function argument destructuring - return (max + min) / 2.0; - }); - // change code above this line - - })(); -` \ No newline at end of file +```javascript +const half = (function() { + "use strict"; // do not change this line + + // change code below this line + return (({max, min}) => { + // use function argument destructuring + return (max + min) / 2.0; + }); + // change code above this line + +})(); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-operator-to-reassign-array-elements/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-operator-to-reassign-array-elements/index.md index b8be99b29e5..90272095bce 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-operator-to-reassign-array-elements/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-operator-to-reassign-array-elements/index.md @@ -20,48 +20,52 @@ localeTitle: استخدم Destructuring Assignment مع عامل التشغيل استخدم destructuring لإنشاء متغير `arr` . - `function removeFirstTwo(list) { - "use strict"; - // change code below this line - const [arr] = list; // change this - // change code above this line - return arr; - } -` +```javascript +function removeFirstTwo(list) { + "use strict"; + // change code below this line + const [arr] = list; // change this + // change code above this line + return arr; +} +``` ## تلميح 2 انشر معلمة `list` في `arr` . - `function removeFirstTwo(list) { - "use strict"; - // change code below this line - const [...arr] = list; // change this - // change code above this line - return arr; - } -` +```javascript +function removeFirstTwo(list) { + "use strict"; + // change code below this line + const [...arr] = list; // change this + // change code above this line + return arr; +} +``` ## تلميح 3 استبعاد أول عنصرين من صفيف `arr` مع `,,` . - `function removeFirstTwo(list) { - "use strict"; - // change code below this line - const [,,...arr] = list; // change this - // change code above this line - return arr; - } -` +```javascript +function removeFirstTwo(list) { + "use strict"; + // change code below this line + const [,,...arr] = list; // change this + // change code above this line + return arr; +} +``` ## تنبيه المفسد - الحل إلى الأمام! - `function removeFirstTwo(list) { - "use strict"; - // change code below this line - const [a, b, ...arr] = list; - // change code above this line - return arr; - } -` \ No newline at end of file +```javascript +function removeFirstTwo(list) { + "use strict"; + // change code below this line + const [a, b, ...arr] = list; + // change code above this line + return arr; +} +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-export-to-reuse-a-code-block/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-export-to-reuse-a-code-block/index.md index 9659f75fe0d..16b92ade8ed 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-export-to-reuse-a-code-block/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-export-to-reuse-a-code-block/index.md @@ -16,7 +16,8 @@ localeTitle: استخدم التصدير لإعادة استخدام كتلة ت ## حل - `"use strict"; - export const foo = "bar"; - export const bar = "foo"; -` \ No newline at end of file +```javascript +"use strict"; +export const foo = "bar"; +export const bar = "foo"; +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place/index.md index f3496d766ec..043934207ac 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place/index.md @@ -29,17 +29,20 @@ localeTitle: استخدم Spread Operator لتقييم Arrays في - مكان ### 3 أمثلة سريعة - `let numbers = [-12, 160, 0, -3, 51]; - let minNum = Math.min.apply(null, numbers); - console.log(minNum);//-12 -` +```javascript +let numbers = [-12, 160, 0, -3, 51]; +let minNum = Math.min.apply(null, numbers); +console.log(minNum);//-12 +``` - `let numbers = [-12, 160, 0, -3, 51]; - let minNum = Math.min(numbers); - console.log(minNum);//NaN -` +```javascript +let numbers = [-12, 160, 0, -3, 51]; +let minNum = Math.min(numbers); +console.log(minNum);//NaN +``` - `let numbers = [-12, 160, 0, -3, 51]; - let minNum = Math.min(...numbers); - console.log(minNum);//-12 -` \ No newline at end of file +```javascript +let numbers = [-12, 160, 0, -3, 51]; +let minNum = Math.min(...numbers); +console.log(minNum);//-12 +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters/index.md index d786757ba95..488b50e1d10 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/write-arrow-functions-with-parameters/index.md @@ -20,10 +20,11 @@ localeTitle: كتابة وظائف السهم مع المعلمات ## حل: - `const myConcat = (arr1, arr2) => { - "use strict"; - return arr1.concat(arr2); - }; - // test your code - console.log(myConcat([1, 2], [3, 4, 5])); -` \ No newline at end of file +```javascript +const myConcat = (arr1, arr2) => { + "use strict"; + return arr1.concat(arr2); +}; +// test your code +console.log(myConcat([1, 2], [3, 4, 5])); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/write-concise-declarative-functions-with-es6/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/write-concise-declarative-functions-with-es6/index.md index 419b71b5af9..43f9559567f 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/write-concise-declarative-functions-with-es6/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/write-concise-declarative-functions-with-es6/index.md @@ -14,11 +14,12 @@ ES6 يجعل من السهل ، والخيال ، لكتابة وظائف الإ ## حل - `const bicycle = { - gear: 2, - setGear(newGear) { - "use strict"; - this.gear = newGear; - } - }; -` \ No newline at end of file +```javascript +const bicycle = { + gear: 2, + setGear(newGear) { + "use strict"; + this.gear = newGear; + } +}; +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-simple-fields/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-simple-fields/index.md index 994ebb6f700..956ac6430b9 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-simple-fields/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-simple-fields/index.md @@ -14,14 +14,15 @@ localeTitle: كتابة تعريفات كائن حرفي باستخدام حقو ## حل - `const createPerson = (name, age, gender) => { - "use strict"; - // change code below this line - return { - name, - age, - gender - }; - // change code above this line - }; -` \ No newline at end of file +```javascript +const createPerson = (name, age, gender) => { + "use strict"; + // change code below this line + return { + name, + age, + gender + }; + // change code above this line +}; +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs/index.md index fd2be598b88..79ace59339f 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs/index.md @@ -23,14 +23,15 @@ localeTitle: تطبيق برمجة وظيفية لتحويل السلاسل إل ### حل بديل - `// the global variable - var globalTitle = "Winter Is Coming"; - - // Add your code below this line - function urlSlug(title) { - return title.toLowerCase().trim().split(/\s+/).join('-'); - } - // Add your code above this line - - var winterComing = urlSlug(globalTitle); // Should be "winter-is-coming" -` \ No newline at end of file +```javascript +// the global variable +var globalTitle = "Winter Is Coming"; + +// Add your code below this line +function urlSlug(title) { + return title.toLowerCase().trim().split(/\s+/).join('-'); +} +// Add your code above this line + +var winterComing = urlSlug(globalTitle); // Should be "winter-is-coming" +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method/index.md index 99cc068e380..4bfa3b7b328 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method/index.md @@ -24,10 +24,11 @@ localeTitle: دمج صفيف في سلسلة باستخدام طريقة الا ### حل: - `function sentensify(str) { - // Add your code below this line - return str.split(/\W/).join(' '); - // Add your code above this line - } - sentensify("May-the-force-be-with-you"); -` \ No newline at end of file +```javascript +function sentensify(str) { + // Add your code below this line + return str.split(/\W/).join(' '); + // Add your code above this line +} +sentensify("May-the-force-be-with-you"); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype/index.md index 1fc070b3350..5c050f3e41b 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype/index.md @@ -10,22 +10,23 @@ localeTitle: تنفيذ الخريطة على نموذج أولي ومن هناك ، يمكننا استخدام forEach أو for loop لإضافة عناصر إلى مصفوفة فارغة تم تعريفها بالفعل ، حيث نقوم بتعديل كل عنصر باستخدام طريقة رد الاتصال المحددة. - `// the global Array - var s = [23, 65, 98, 5]; - - Array.prototype.myMap = function(callback){ - var newArray = []; - // Add your code below this line - this.forEach(a => newArray.push(callback(a))); - // Add your code above this line - return newArray; - - }; - - var new_s = s.myMap(function(item){ - return item * 2; - }); -` +```javascript +// the global Array +var s = [23, 65, 98, 5]; + +Array.prototype.myMap = function(callback){ + var newArray = []; + // Add your code below this line + this.forEach(a => newArray.push(callback(a))); + // Add your code above this line + return newArray; + +}; + +var new_s = s.myMap(function(item){ + return item * 2; +}); +``` ### روابط مفيدة diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype/index.md index a3c210d6ce5..f3f37c0a325 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype/index.md @@ -4,22 +4,23 @@ localeTitle: تنفيذ مرشح طريقة على النموذج --- ## تنفيذ مرشح طريقة على النموذج - `// the global Array - var s = [23, 65, 98, 5]; - - Array.prototype.myFilter = function(callback){ - var newArray = []; - // Add your code below this line - this.forEach(function(x) { - if (callback(x) == true) { - newArray.push(x); - } - }) - // Add your code above this line - return newArray; - - }; -` +```javascript +// the global Array +var s = [23, 65, 98, 5]; + +Array.prototype.myFilter = function(callback){ + var newArray = []; + // Add your code below this line + this.forEach(function(x) { + if (callback(x) == true) { + newArray.push(x); + } + }) + // Add your code above this line + return newArray; + +}; +``` ## حل آخر باستخدام looop! diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/introduction-to-currying-and-partial-application/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/introduction-to-currying-and-partial-application/index.md index e2052f2958a..6d8ba8f143d 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/introduction-to-currying-and-partial-application/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/introduction-to-currying-and-partial-application/index.md @@ -6,14 +6,15 @@ localeTitle: مقدمة في التجلي والتطبيق الجزئي ### حل - `function add(x) { - // Add your code below this line - return function(y) { - return function(z) { - return x + y + z; - } - } - // Add your code above this line - } - add(10)(20)(30); -` \ No newline at end of file +```javascript +function add(x) { + // Add your code below this line + return function(y) { + return function(z) { + return x + y + z; + } + } + // Add your code above this line +} +add(10)(20)(30); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions/index.md index 2d8ea0aa5d5..70ddad25304 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions/index.md @@ -13,31 +13,33 @@ localeTitle: المتغيرات العالمية ريفاكتور من الوظ ## الحل 1 - `function add (arr, bookName) { - let newArr = [...arr]; // Copy the bookList array to a new array. - newArr.push(bookName); // Add bookName parameter to the end of the new array. - return newArr; // Return the new array. - } - - function remove (arr, bookName) { - let newArr = [...arr]; // Copy the bookList array to a new array. - if (newArr.indexOf(bookName) >= 0) { // Check whether the bookName parameter is in new array. - /. - newArr.splice(newArr.indexOf(bookName), 1); // Remove the given paramater from the new array. - return newArr; // Return the new array. - } - } -` +```javascript +function add (arr, bookName) { + let newArr = [...arr]; // Copy the bookList array to a new array. + newArr.push(bookName); // Add bookName parameter to the end of the new array. + return newArr; // Return the new array. +} + +function remove (arr, bookName) { + let newArr = [...arr]; // Copy the bookList array to a new array. + if (newArr.indexOf(bookName) >= 0) { // Check whether the bookName parameter is in new array. + /. + newArr.splice(newArr.indexOf(bookName), 1); // Remove the given paramater from the new array. + return newArr; // Return the new array. + } +} +``` ## الحل 2 - `function add (list,bookName) { - return [...list, bookName]; - } - - function remove (list,bookName) { - if (list.indexOf(bookName) >= 0) { - return list.filter((item) => item !== bookName); - } - } -` \ No newline at end of file +```javascript +function add (list,bookName) { + return [...list, bookName]; +} + +function remove (list,bookName) { + if (list.indexOf(bookName) >= 0) { + return list.filter((item) => item !== bookName); + } +} +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array/index.md index ab2341614ae..1ec71bf8b38 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array/index.md @@ -10,13 +10,14 @@ localeTitle: إرجاع صفيف Sorted دون تغيير في صفيف الأص ### حل - `var globalArray = [5, 6, 3, 2, 9]; - function nonMutatingSort(arr) { - // Add your code below this line - return [].concat(arr).sort(function(a, b) { - return a - b; - }); - // Add your code above this line - } - nonMutatingSort(globalArray); -` \ No newline at end of file +```javascript +var globalArray = [5, 6, 3, 2, 9]; +function nonMutatingSort(arr) { + // Add your code below this line + return [].concat(arr).sort(function(a, b) { + return a - b; + }); + // Add your code above this line +} +nonMutatingSort(globalArray); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method/index.md index e3ef04eb2d4..1b55982de2f 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method/index.md @@ -12,20 +12,22 @@ localeTitle: عودة جزء من صفيف باستخدام طريقة شريح يمكن كتابة الدالة ببساطة عن طريق كتابة سطر واحد من التعليمات البرمجية - عبارة return. تمامًا كما في المثال المعطى ، قم `beginSlice` المصفوفة التي تأخذها الدالة كمعلمة باستخدام معلمات `beginSlice` و `endSlice` كمعلمات `endSlice` `slice()` . تذكر بنية طريقة `slice()` : - `var arr = ["Cat", "Dog", "Tiger", "Zebra", "Ant"]; - arr.slice([index-to-begin-slice] , [index-to-end-slice]); -` +```javascript +var arr = ["Cat", "Dog", "Tiger", "Zebra", "Ant"]; +arr.slice([index-to-begin-slice] , [index-to-end-slice]); +``` ### حل - `function sliceArray(anim, beginSlice, endSlice) { - // Add your code below this line - return anim.slice(beginSlice, endSlice); - // Add your code above this line - } - var inputAnim = ["Cat", "Dog", "Tiger", "Zebra", "Ant"]; - sliceArray(inputAnim, 1, 3); -` +```javascript +function sliceArray(anim, beginSlice, endSlice) { + // Add your code below this line + return anim.slice(beginSlice, endSlice); + // Add your code above this line +} +var inputAnim = ["Cat", "Dog", "Tiger", "Zebra", "Ant"]; +sliceArray(inputAnim, 1, 3); +``` #### روابط ذات صلة: diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method/index.md index 2d5fbe07386..60f54360868 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method/index.md @@ -8,25 +8,27 @@ localeTitle: فرز صفيف أبجديا باستخدام طريقة الفرز في المثال المعطى ، نرى كيف نكتب دالة ستعيد مصفوفة جديدة بترتيب أبجدي معكوس. - `function reverseAlpha(arr) { - return arr.sort(function(a, b) { - return a < b; - }); - } - reverseAlpha(['l', 'h', 'z', 'b', 's']); - // Returns ['z', 's', 'l', 'h', 'b'] -` +```javascript +function reverseAlpha(arr) { + return arr.sort(function(a, b) { + return a < b; + }); +} +reverseAlpha(['l', 'h', 'z', 'b', 's']); +// Returns ['z', 's', 'l', 'h', 'b'] +``` باستخدام هذا المنطق ، ببساطة عكس هندسة وظيفة لإرجاع مجموعة جديدة بالترتيب الأبجدي. ### حل - `function alphabeticalOrder(arr) { - // Add your code below this line - return arr.sort(function(a,b) { - return a > b; - }); - // Add your code above this line - } - alphabeticalOrder(["a", "d", "c", "a", "z", "g"]); -` \ No newline at end of file +```javascript +function alphabeticalOrder(arr) { + // Add your code below this line + return arr.sort(function(a,b) { + return a > b; + }); + // Add your code above this line +} +alphabeticalOrder(["a", "d", "c", "a", "z", "g"]); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/split-a-string-into-an-array-using-the-split-method/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/split-a-string-into-an-array-using-the-split-method/index.md index 53919fe4cfe..f9a072f34d5 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/split-a-string-into-an-array-using-the-split-method/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/split-a-string-into-an-array-using-the-split-method/index.md @@ -12,10 +12,11 @@ localeTitle: تقسيم سلسلة في صفيف باستخدام طريقة ا ### حل - `function splitify(str) { - // Add your code below this line - return str.split(/\W/); - // Add your code above this line - } - splitify("Hello World,I-am code"); -` \ No newline at end of file +```javascript +function splitify(str) { + // Add your code below this line + return str.split(/\W/); + // Add your code above this line +} +splitify("Hello World,I-am code"); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria/index.md index d6754bad91e..b038bc56722 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria/index.md @@ -29,12 +29,13 @@ localeTitle: استخدم كل أسلوب للتحقق من أن كل عنصر ## حل بديل - `function checkPositive(arr) { - // Add your code below this line - return arr.every(function(value) { - return value > 0; - }); - // Add your code above this line - } - checkPositive([1, 2, 3, -4, 5]); -` \ No newline at end of file +```javascript +function checkPositive(arr) { + // Add your code below this line + return arr.every(function(value) { + return value > 0; + }); + // Add your code above this line +} +checkPositive([1, 2, 3, -4, 5]); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array/index.md index a6a35369da5..8508c3dfae0 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array/index.md @@ -10,11 +10,12 @@ localeTitle: استخدم طريقة التصفية لاستخراج البيا ### حل - `// Add your code below this line - - var filteredList = watchList.map(function(e) { - return {title: e["Title"], rating: e["imdbRating"]} - }).filter((e) => e.rating >= 8); - - console.log(filteredList); -` \ No newline at end of file +```javascript +// Add your code below this line + +var filteredList = watchList.map(function(e) { + return {title: e["Title"], rating: e["imdbRating"]} +}).filter((e) => e.rating >= 8); + +console.log(filteredList); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria/index.md index bb6f03a5794..d354b4e7d96 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria/index.md @@ -14,8 +14,9 @@ localeTitle: استخدم بعض الأسلوب للتحقق من أن أي عن ### حل: - `function checkPositive(arr) { - return arr.some((elem) => elem > 0); - } - checkPositive([1, 2, 3, -4, 5]); -` \ No newline at end of file +```javascript +function checkPositive(arr) { + return arr.some((elem) => elem > 0); +} +checkPositive([1, 2, 3, -4, 5]); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person/index.md index fdf51ff3a13..d53b7310357 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person/index.md @@ -41,10 +41,11 @@ localeTitle: اصنع شخصا إذا كنت تواجه مشاكل في كتابة أساليب `setter` ، في ما يلي نموذج لأسلوب `set` : - `this.setFullName = function(input) { - // Insert your code here - } -` +```js +this.setFullName = function(input) { + // Insert your code here +} +``` > _حاول أن تحل المشكلة الآن_ @@ -56,37 +57,38 @@ localeTitle: اصنع شخصا ## ![:beginner:](https://forum.freecodecamp.com/images/emoji/emoji_one/beginner.png?v=3 ":مبتدئ:") الحل الأساسي للكود: - `var Person = function(firstAndLast) { - var fullName = firstAndLast; - - this.getFirstName = function() { - return fullName.split(" ")[0]; - }; - - this.getLastName = function() { - return fullName.split(" ")[1]; - }; - - this.getFullName = function() { - return fullName; - }; - - this.setFirstName = function(name) { - fullName = name + " " + fullName.split(" ")[1]; - }; - - this.setLastName = function(name) { - fullName = fullName.split(" ")[0] + " " + name; - }; - - this.setFullName = function(name) { - fullName = name; - }; - }; - - var bob = new Person('Bob Ross'); - bob.getFullName(); -` +```js +var Person = function(firstAndLast) { + var fullName = firstAndLast; + + this.getFirstName = function() { + return fullName.split(" ")[0]; + }; + + this.getLastName = function() { + return fullName.split(" ")[1]; + }; + + this.getFullName = function() { + return fullName; + }; + + this.setFirstName = function(name) { + fullName = name + " " + fullName.split(" ")[1]; + }; + + this.setLastName = function(name) { + fullName = fullName.split(" ")[0] + " " + name; + }; + + this.setFullName = function(name) { + fullName = name; + }; +}; + +var bob = new Person('Bob Ross'); +bob.getFullName(); +``` ### شرح الشفرة: diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace/index.md index 36628d10408..2bdd062b3b9 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace/index.md @@ -199,17 +199,18 @@ localeTitle: بحث واستبدال ## ![:rotating_light:](https://forum.freecodecamp.com/images/emoji/emoji_one/rotating_light.png?v=3 ": rotating_light:") حل رمز متقدم البديل 2: - `function myReplace(str, before, after) { - const myArr = str.split(' '); - const [wordToReplace] = myArr.filter(item => item === before); - return wordToReplace[0].toUpperCase() !== wordToReplace[0] - ? myArr.map(item => item === before ? after : item).join(' ') - : myArr.map(item => item === before? after[0].toUpperCase() + after.slice(1) : item).join(' '); - } - - // test: - myReplace("A quick brown fox jumped over the lazy dog", "jumped", "leaped"); -` +```javascript +function myReplace(str, before, after) { + const myArr = str.split(' '); + const [wordToReplace] = myArr.filter(item => item === before); + return wordToReplace[0].toUpperCase() !== wordToReplace[0] + ? myArr.map(item => item === before ? after : item).join(' ') + : myArr.map(item => item === before? after[0].toUpperCase() + after.slice(1) : item).join(' '); +} + +// test: +myReplace("A quick brown fox jumped over the lazy dog", "jumped", "leaped"); +``` #### روابط ذات صلة diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy/index.md index 7725b74cba6..376bee70a6a 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy/index.md @@ -100,8 +100,9 @@ localeTitle: تسعى وتدمر ## الحل المتقدم للكود: - `const destroyer = (arr, ...args) => arr.filter(i => !args.includes(i)); -` +```javascript +const destroyer = (arr, ...args) => arr.filter(i => !args.includes(i)); +``` ### شرح الشفرة: diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union/index.md index 4843612fe38..106b3ff2572 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union/index.md @@ -83,21 +83,22 @@ localeTitle: الاتحاد الفرز ## بديلة حل رمز الأساسية - `function uniteUnique(arr) { - var args = [...arguments]; - var result = []; - for(var i = 0; i < args.length; i++) { - for(var j = 0; j < args[i].length; j++) { - if(!result.includes(args[i][j])) { - result.push(args[i][j]); - } - } - } - return result; - } - - uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]); -` +```javascript +function uniteUnique(arr) { + var args = [...arguments]; + var result = []; + for(var i = 0; i < args.length; i++) { + for(var j = 0; j < args[i].length; j++) { + if(!result.includes(args[i][j])) { + result.push(args[i][j]); + } + } + } + return result; +} + +uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]); +``` ## ![:sunflower:](https://forum.freecodecamp.com/images/emoji/emoji_one/sunflower.png?v=3 ":دوار الشمس:") حل الشفرة المتوسطة: diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance/index.md index 2787acd8e82..4dacc971a12 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance/index.md @@ -8,30 +8,32 @@ localeTitle: إضافة طرق بعد الوراثة تمامًا كما في المثال التالي ، يجب إنشاء مثيل جديد لكائن - `Dog` - ويجب تعيين `prototype` . - `function Bird() { } - Bird.prototype = Object.create(Animal.prototype); - Bird.prototype.constructor = Bird; -` +```javascript +function Bird() { } +Bird.prototype = Object.create(Animal.prototype); +Bird.prototype.constructor = Bird; +``` ثم يجب إضافة وظيفة جديدة - `bark()` - إلى نموذج الكلب. ### حل - `function Animal() { } - Animal.prototype.eat = function() { console.log("nom nom nom"); }; - - function Dog() { } - - // Add your code below this line - Dog.prototype = Object.create(Animal.prototype); - Dog.prototype.constructor = Dog; - Dog.prototype.bark = function() { - console.log("Woof woof!"); - }; - // Add your code above this line - - let beagle = new Dog(); - - beagle.eat(); // Should print "nom nom nom" - beagle.bark(); // Should print "Woof!" -` \ No newline at end of file +```javascript +function Animal() { } +Animal.prototype.eat = function() { console.log("nom nom nom"); }; + +function Dog() { } + +// Add your code below this line +Dog.prototype = Object.create(Animal.prototype); +Dog.prototype.constructor = Dog; +Dog.prototype.bark = function() { + console.log("Woof woof!"); +}; +// Add your code above this line + +let beagle = new Dog(); + +beagle.eat(); // Should print "nom nom nom" +beagle.bark(); // Should print "Woof!" +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/change-the-prototype-to-a-new-object/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/change-the-prototype-to-a-new-object/index.md index 223589904e2..1fb2b073c39 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/change-the-prototype-to-a-new-object/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/change-the-prototype-to-a-new-object/index.md @@ -28,20 +28,21 @@ localeTitle: تغيير النموذج إلى كائن جديد ## الحل 1: - `function Dog(name) { - this.name = name; - } - Dog.prototype = { - // Add your code below this line - numLegs: 2, - eat: function(){ - console.log('nom nom nom'); - }, - describe: function(){ - console.log("My name is " + this.name); - } - } -` +```javascript +function Dog(name) { + this.name = name; +} +Dog.prototype = { + // Add your code below this line + numLegs: 2, + eat: function(){ + console.log('nom nom nom'); + }, + describe: function(){ + console.log("My name is " + this.name); + } +} +``` ## شرح الشفرة: @@ -51,21 +52,22 @@ localeTitle: تغيير النموذج إلى كائن جديد ## الحل 2: - `function Dog(name) { - this.name = name; - } - - Dog.prototype = { - // Add your code below this line - numLegs: 2, - eat(){ - console.log('nom nom nom'); - }, - describe(){ - console.log("My name is " + this.name); - } - }; -` +```javascript +function Dog(name) { + this.name = name; +} + +Dog.prototype = { + // Add your code below this line + numLegs: 2, + eat(){ + console.log('nom nom nom'); + }, + describe(){ + console.log("My name is " + this.name); + } +}; +``` ## شرح الشفرة: diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/create-a-basic-javascript-object/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/create-a-basic-javascript-object/index.md index 4b3f4539a49..f7b78646c8a 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/create-a-basic-javascript-object/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/create-a-basic-javascript-object/index.md @@ -10,8 +10,9 @@ localeTitle: قم بإنشاء كائن JavaScript أساسي ### حل: - `let dog = { - name: "George", - numLegs: 4 - }; -` \ No newline at end of file +```javascript +let dog = { + name: "George", + numLegs: 4 +}; +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/create-a-method-on-an-object/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/create-a-method-on-an-object/index.md index 944bc6cc848..f791ad5006d 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/create-a-method-on-an-object/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/create-a-method-on-an-object/index.md @@ -19,13 +19,14 @@ localeTitle: إنشاء طريقة على كائن ### حل: - `let dog = { - name: "Spot", - numLegs: 4, - sayLegs: function() { - return "This dog has " + dog.numLegs + " legs."; - } - }; - - dog.sayLegs(); -` \ No newline at end of file +```javascript +let dog = { + name: "Spot", + numLegs: 4, + sayLegs: function() { + return "This dog has " + dog.numLegs + " legs."; + } +}; + +dog.sayLegs(); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function/index.md index a39727ba6d3..e2faacff50b 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/define-a-constructor-function/index.md @@ -10,9 +10,10 @@ localeTitle: تحديد وظيفة منشئ ### حل: - `function Dog() { - this.name = "Geogre", - this.color = "White", - this.numLegs = 4; - } -` \ No newline at end of file +```javascript +function Dog() { + this.name = "Geogre", + this.color = "White", + this.numLegs = 4; +} +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/extend-constructors-to-receive-arguments/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/extend-constructors-to-receive-arguments/index.md index da9bcbd493b..e3904595233 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/extend-constructors-to-receive-arguments/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/extend-constructors-to-receive-arguments/index.md @@ -10,10 +10,11 @@ localeTitle: تمديد البنائين لتلقي الحجج ### حل: - `function Dog(name, color) { - this.name = name; - this.color = color; - this.numLegs = 4; - } - let terrier = new Dog("George","White"); -` \ No newline at end of file +```javascript +function Dog(name, color) { + this.name = name; + this.color = color; + this.numLegs = 4; +} +let terrier = new Dog("George","White"); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype/index.md index f5649998fee..97f514e64eb 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype/index.md @@ -12,8 +12,9 @@ localeTitle: وراثة السلوكيات من Supertype السماح للحيوان = Object.create (Animal.prototype) ؛ - `### Solution -` +``` +### Solution +``` جافا سكريبت diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties/index.md index 88f1d283b6d..f9988e51522 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties/index.md @@ -10,24 +10,25 @@ localeTitle: تكرار جميع الممتلكات ### حل - `function Dog(name) { - this.name = name; - } - - Dog.prototype.numLegs = 4; - - let beagle = new Dog("Snoopy"); - - let ownProps = []; - let prototypeProps = []; - - // Add your code below this line - for (let property in beagle) { - if(Dog.hasOwnProperty(property)) { - ownProps.push(property) - } - else { - prototypeProps.push(property) - } - } -` \ No newline at end of file +```javascript +function Dog(name) { + this.name = name; +} + +Dog.prototype.numLegs = 4; + +let beagle = new Dog("Snoopy"); + +let ownProps = []; +let prototypeProps = []; + +// Add your code below this line +for (let property in beagle) { + if(Dog.hasOwnProperty(property)) { + ownProps.push(property) + } + else { + prototypeProps.push(property) + } +} +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/make-code-more-reusable-with-the-this-keyword/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/make-code-more-reusable-with-the-this-keyword/index.md index a41453d79e2..465c2ac6c29 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/make-code-more-reusable-with-the-this-keyword/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/make-code-more-reusable-with-the-this-keyword/index.md @@ -10,11 +10,12 @@ localeTitle: جعل رمز أكثر قابلة لإعادة الاستخدام ### حل: - `let dog = { - name: "Spot", - numLegs: 4, - sayLegs: function() {return "This dog has " + this.numLegs + " legs.";} - }; - - dog.sayLegs(); -` \ No newline at end of file +```javascript +let dog = { + name: "Spot", + numLegs: 4, + sayLegs: function() {return "This dog has " + this.numLegs + " legs.";} +}; + +dog.sayLegs(); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/override-inherited-methods/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/override-inherited-methods/index.md index 4654c9a65c9..bd881b125e1 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/override-inherited-methods/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/override-inherited-methods/index.md @@ -6,7 +6,8 @@ localeTitle: تجاوز الأساليب الموروثة # حل - `Penguin.prototype.fly = function() { - return "Alas, this is a flightless bird."; - }; -` \ No newline at end of file +```javascript +Penguin.prototype.fly = function() { + return "Alas, this is a flightless bird."; +}; +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/remember-to-set-the-constructor-property-when-changing-the-prototype/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/remember-to-set-the-constructor-property-when-changing-the-prototype/index.md index f651f4c3d88..b6349d94532 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/remember-to-set-the-constructor-property-when-changing-the-prototype/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/remember-to-set-the-constructor-property-when-changing-the-prototype/index.md @@ -8,16 +8,17 @@ localeTitle: تذكر تعيين الخاصية منشئ عند تغيير "ال # حل - `Dog.prototype = { - - constructor: Dog, // Solution - - numLegs: 2, - eat: function() { - console.log("nom nom nom"); - }, - describe: function() { - console.log("My name is " + this.name); - } - }; -` \ No newline at end of file +```javascript +Dog.prototype = { + + constructor: Dog, // Solution + + numLegs: 2, + eat: function() { + console.log("nom nom nom"); + }, + describe: function() { + console.log("My name is " + this.name); + } +}; +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property/index.md index 45e810a5c6f..d2a47931998 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property/index.md @@ -8,22 +8,24 @@ localeTitle: إعادة تعيين منشئ Conherrated الخاصية تمت برمجة كائنات `duck` `beagle` لترث خصائص `supertypes` . للكتابة فوق هذين السطرين من التعليمات البرمجية يجب أن تتم كتابتها لتعيين المنشئين إلى المنشئين المطلوبين `Bird` و `Dog` . يوضح التعليمة البرمجية التالية كيف يمكن تحقيق ذلك. - `Bird.prototype.constructor = Bird; -` +```javascript +Bird.prototype.constructor = Bird; +``` ### حل - `function Animal() { } - function Bird() { } - function Dog() { } - - Bird.prototype = Object.create(Animal.prototype); - Dog.prototype = Object.create(Animal.prototype); - - // Add your code below this line - Bird.prototype.constructor = Bird; - Dog.prototype.constructor = Dog; - - let duck = new Bird(); - let beagle = new Dog(); -` \ No newline at end of file +```javascript +function Animal() { } +function Bird() { } +function Dog() { } + +Bird.prototype = Object.create(Animal.prototype); +Dog.prototype = Object.create(Animal.prototype); + +// Add your code below this line +Bird.prototype.constructor = Bird; +Dog.prototype.constructor = Dog; + +let duck = new Bird(); +let beagle = new Dog(); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/set-the-childs-prototype-to-an-instance-of-the-parent/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/set-the-childs-prototype-to-an-instance-of-the-parent/index.md index 9ca9637a6fd..2175750d3dd 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/set-the-childs-prototype-to-an-instance-of-the-parent/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/set-the-childs-prototype-to-an-instance-of-the-parent/index.md @@ -8,25 +8,27 @@ localeTitle: قم بتعيين Prototype الخاص بالطفل إلى مثيل لا يختلف هذا التحدي عن التحدي الأخير ، حيث يجب عليك إنشاء كائن يرث من النوع `supertype` . فقط هذه المرة سوف يرث `Dog` الفرعي نوع `Animal` الفائق. ببساطة إنشاء مثيل جديد من `Dog.prototype` مثل المثال التالي. - `Bird.prototype = Object.create(Animal.prototype); -` +```javascript +Bird.prototype = Object.create(Animal.prototype); +``` ### حل - `function Animal() { } - - Animal.prototype = { - constructor: Animal, - eat: function() { - console.log("nom nom nom"); - } - }; - - function Dog() { } - - // Add your code below this line - Dog.prototype = Object.create(Animal.prototype); - - let beagle = new Dog(); - beagle.eat(); // Should print "nom nom nom" -` \ No newline at end of file +```javascript +function Animal() { } + +Animal.prototype = { + constructor: Animal, + eat: function() { + console.log("nom nom nom"); + } +}; + +function Dog() { } + +// Add your code below this line +Dog.prototype = Object.create(Animal.prototype); + +let beagle = new Dog(); +beagle.eat(); // Should print "nom nom nom" +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties/index.md index 69419724609..0252e6ea40a 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties/index.md @@ -12,12 +12,13 @@ localeTitle: فهم خصائص خاصة ### حل: - `let canary = new Bird("Tweety"); - let ownProps = []; - // Add your code below this line - for(let property in canary) { - if(canary.hasOwnProperty(property)) { - ownProps.push(property); - } - } -` \ No newline at end of file +```javascript +let canary = new Bird("Tweety"); +let ownProps = []; +// Add your code below this line +for(let property in canary) { + if(canary.hasOwnProperty(property)) { + ownProps.push(property); + } +} +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property/index.md index 5bcf8188e71..22984fb29b6 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property/index.md @@ -10,17 +10,18 @@ localeTitle: فهم خاصية منشئ ### حل - `function Dog(name) { - this.name = name; - } - - // Add your code below this line - function joinDogFraternity(candidate) { - if(candidate.constructor === Dog) { - return true; - } - else { - return false; - } - } -` \ No newline at end of file +```javascript +function Dog(name) { + this.name = name; +} + +// Add your code below this line +function joinDogFraternity(candidate) { + if(candidate.constructor === Dog) { + return true; + } + else { + return false; + } +} +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife/index.md index e5bbf9d5f75..ba892e0a547 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife/index.md @@ -10,7 +10,8 @@ localeTitle: فهم تعبير الدالة المستحثة فوراً (IIFE) ### حل - `(function() { - console.log("A cozy nest is ready"); - })(); -` \ No newline at end of file +```javascript +(function() { + console.log("A cozy nest is ready"); +})(); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects/index.md index 04d520115dc..ce72acf63ec 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects/index.md @@ -10,11 +10,12 @@ localeTitle: استخدم منشئ لإنشاء كائنات ### حل: - `function Dog() { - this.name = "Rupert"; - this.color = "brown"; - this.numLegs = 4; - } - // Add your code below this line - let hound = new Dog(); -` \ No newline at end of file +```javascript +function Dog() { + this.name = "Rupert"; + this.color = "brown"; + this.numLegs = 4; +} +// Add your code below this line +let hound = new Dog(); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects/index.md index 73d3b3907fb..486a8d87b47 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects/index.md @@ -10,22 +10,23 @@ localeTitle: استخدم Mixin لإضافة سلوك شائع بين الكائ ### حل - `let bird = { - name: "Donald", - numLegs: 2 - }; - - let boat = { - name: "Warrior", - type: "race-boat" - }; - - // Add your code below this line - let glideMixin = function(obj) { - obj.glide = function() { - console.log("Gliding!"); - } - }; - glideMixin(bird); - glideMixin(boat); -` \ No newline at end of file +```javascript +let bird = { + name: "Donald", + numLegs: 2 +}; + +let boat = { + name: "Warrior", + type: "race-boat" +}; + +// Add your code below this line +let glideMixin = function(obj) { + obj.glide = function() { + console.log("Gliding!"); + } +}; +glideMixin(bird); +glideMixin(boat); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-an-iife-to-create-a-module/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-an-iife-to-create-a-module/index.md index 38b6dfe8a53..5cfccaf66d2 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-an-iife-to-create-a-module/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-an-iife-to-create-a-module/index.md @@ -8,35 +8,37 @@ localeTitle: استخدم IIFE لإنشاء وحدة نمطية يجب أن تكون ملفوفة في كلا `Mixin` 's في `funModule` جديدة لذا نقطة بداية esay للتعليق خارج الكود حتى الآن. - `/*let isCuteMixin = function(obj) { - obj.isCute = function() { - return true; - }; - }; - let singMixin = function(obj) { - obj.sing = function() { - console.log("Singing to an awesome tune"); - }; - }; - */ -` +```javascript +/*let isCuteMixin = function(obj) { + obj.isCute = function() { + return true; + }; +}; +let singMixin = function(obj) { + obj.sing = function() { + console.log("Singing to an awesome tune"); + }; +}; +*/ +``` ثم أدناه ابدأ بكتابة كود `funModule` الجديد. داخل الوحدة النمطية الجديدة ، تحتاج إلى كتابة بيان إرجاع لإرجاع كتل التعليمات البرمجية `Mixin` . ما عليك سوى نسخ كل من الكود الأصلي لكتل `Mixin` إلى كود الوحدة الجديدة ، ولكن تذكر أن تفصل كل من المزيج مع `,` ### حل - `let funModule = (function() { - return { - isCuteMixin: function(obj) { - obj.isCute = function() { - return true; - }; - }, - singMixin: function(obj) { - obj.sing = function() { - console.log("Singing to an awesome tune"); - }; - } - } - })(); -` \ No newline at end of file +```javascript +let funModule = (function() { + return { + isCuteMixin: function(obj) { + obj.isCute = function() { + return true; + }; + }, + singMixin: function(obj) { + obj.sing = function() { + console.log("Singing to an awesome tune"); + }; + } + } +})(); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object/index.md index 17f1d196069..360cd72de7f 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object/index.md @@ -8,23 +8,25 @@ localeTitle: استخدم Dot Notation للوصول إلى خصائص كائن ستقوم التعليمة البرمجية التالية ببساطة طباعة `property1` من كائن `obj` . - `let obj = { - property1 = 1, - property2 = 2 - }; - - console.log(obj.property1); -` +```javascript +let obj = { + property1 = 1, + property2 = 2 +}; + +console.log(obj.property1); +``` باتباع هذا المنطق ، استخدم عملية `console.log` لطباعة كل من `property1` و `property2` على الشاشة. ### حل: - `let dog = { - name: "Spot", - numLegs: 4 - }; - // Add your code below this line - console.log(dog.name); - console.log(dog.numLegs); -` \ No newline at end of file +```javascript +let dog = { + name: "Spot", + numLegs: 4 +}; +// Add your code below this line +console.log(dog.name); +console.log(dog.numLegs); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-inheritance-so-you-dont-repeat-yourself/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-inheritance-so-you-dont-repeat-yourself/index.md index bf0157939a5..05c775a7e29 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-inheritance-so-you-dont-repeat-yourself/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-inheritance-so-you-dont-repeat-yourself/index.md @@ -8,28 +8,29 @@ localeTitle: استخدام الوراثة حتى لا تكرر نفسك قم بإزالة طريقة "تناول الطعام" من Cat.prototype و Bear.prototype وأضفها إلى Animal.prototype. - `function Cat(name) { - this.name = name; - }; - - Cat.prototype = { - constructor: Cat - }; - - function Bear(name) { - this.name = name; - }; - - Bear.prototype = { - constructor: Bear - }; - - function Animal() { }; - - Animal.prototype = { - constructor: Animal, - eat: function() { - console.log("nom nom nom"); - } - }; -` \ No newline at end of file +```javascript +function Cat(name) { + this.name = name; +}; + +Cat.prototype = { + constructor: Cat +}; + +function Bear(name) { + this.name = name; +}; + +Bear.prototype = { + constructor: Bear +}; + +function Animal() { }; + +Animal.prototype = { + constructor: Animal, + eat: function() { + console.log("nom nom nom"); + } +}; +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code/index.md index 2d193dd4496..9749329b3d9 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code/index.md @@ -10,19 +10,21 @@ localeTitle: استخدم خصائص النموذج لتخفيض قانون مك #### مثال: - `Obj.prototype.newProperty = "New Property!"; -` +```javascript +Obj.prototype.newProperty = "New Property!"; +``` باستخدام هذا المنطق ، ببساطة إنشاء خاصية `prototype` جديد لـ `numLegs` . يمكن تمرير حالات الاختبار عن طريق استبدال كائن `Bird` بكائن `Dog` في المثال المعطى - `Bird.prototype.numLegs = 2;` ### حل: - `function Dog(name) { - this.name = name; - } - - Dog.prototype.numLegs = 4; - - // Add your code above this line - let beagle = new Dog("Snoopy"); -` \ No newline at end of file +```javascript +function Dog(name) { + this.name = name; +} + +Dog.prototype.numLegs = 4; + +// Add your code above this line +let beagle = new Dog("Snoopy"); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof/index.md index f8b4ce53080..0bb9eee823b 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof/index.md @@ -10,20 +10,22 @@ localeTitle: تحقق من Constructor كائن مع instanceof #### مثال: - `let hound = new Dog(); -` +```javascript +let hound = new Dog(); +``` تذكر أن تعطي الدالة `House` معلمة لتهيئة عدد الغرف. ثم ببساطة استدعاء العامل `instanceof` للعودة حقيقية على منزلك الجديد. ### حل: - `/* jshint expr: true */ - - function House(numBedrooms) { - this.numBedrooms = numBedrooms; - } - - // Add your code below this line - let myHouse = new House(5); - myHouse instanceof House; -` \ No newline at end of file +```javascript +/* jshint expr: true */ + +function House(numBedrooms) { + this.numBedrooms = numBedrooms; +} + +// Add your code below this line +let myHouse = new House(5); +myHouse instanceof House; +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/extract-matches/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/extract-matches/index.md index 76da8977516..03e3117c77f 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/extract-matches/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/extract-matches/index.md @@ -18,7 +18,8 @@ localeTitle: استخراج مباريات ## حل: - `let extractStr = "Extract the word 'coding' from this string."; - let codingRegex = /coding/; - let result = extractStr.match(codingRegex); -` \ No newline at end of file +```javascript +let extractStr = "Extract the word 'coding' from this string."; +let codingRegex = /coding/; +let result = extractStr.match(codingRegex); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/find-characters-with-lazy-matching/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/find-characters-with-lazy-matching/index.md index 63ac84ac14d..c287896df8a 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/find-characters-with-lazy-matching/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/find-characters-with-lazy-matching/index.md @@ -10,7 +10,8 @@ localeTitle: العثور على شخصيات مع مطابقة كسول #### حل: - `let text = "

Winter is coming

"; - let myRegex = /

?/; // it's the answer! - let result = text.match(myRegex); -` \ No newline at end of file +```js +let text = "

Winter is coming

"; +let myRegex = /

?/; // it's the answer! +let result = text.match(myRegex); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/find-more-than-the-first-match/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/find-more-than-the-first-match/index.md index 135b9f778c5..c73d2eb0348 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/find-more-than-the-first-match/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/find-more-than-the-first-match/index.md @@ -18,7 +18,8 @@ localeTitle: العثور على أكثر من المباراة الأولى ## حل - `let twinkleStar = "Twinkle, twinkle, little star"; - let starRegex = /twinkle/gi; - let result = twinkleStar.match(starRegex); -` \ No newline at end of file +```javascript +let twinkleStar = "Twinkle, twinkle, little star"; +let starRegex = /twinkle/gi; +let result = twinkleStar.match(starRegex); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/find-one-or-more-criminals-in-a-hunt/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/find-one-or-more-criminals-in-a-hunt/index.md index 62a1f96daf4..dfd3cf41e88 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/find-one-or-more-criminals-in-a-hunt/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/find-one-or-more-criminals-in-a-hunt/index.md @@ -21,17 +21,19 @@ localeTitle: العثور على واحد أو أكثر من المجرمين ف هل تستخدم علامة "+" في تعبيرك العادي؟ - `let regexp = /E+/; // returns E, EE, EEE patterns -` +```javascript +let regexp = /E+/; // returns E, EE, EEE patterns +``` ### تحذير المفسد - الحل إلى الأمام ## حل - `let crowd = 'P1P2P3P4P5P6CCCP7P8P9'; - - let reCriminals = /C+/; // Change this line - - let matchedCriminals = crowd.match(reCriminals); - console.log(matchedCriminals); -` \ No newline at end of file +```javascript +let crowd = 'P1P2P3P4P5P6CCCP7P8P9'; + +let reCriminals = /C+/; // Change this line + +let matchedCriminals = crowd.match(reCriminals); +console.log(matchedCriminals); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/ignore-case-while-matching/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/ignore-case-while-matching/index.md index bac5973e306..eda0641af33 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/ignore-case-while-matching/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/ignore-case-while-matching/index.md @@ -14,7 +14,8 @@ localeTitle: تجاهل حالة أثناء المطابقة ## حل - `let myString = "freeCodeCamp"; - let fccRegex = /freeCodeCamp/i; - let result = fccRegex.test(myString); -` \ No newline at end of file +```javascript +let myString = "freeCodeCamp"; +let fccRegex = /freeCodeCamp/i; +let result = fccRegex.test(myString); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-a-literal-string-with-different-possibilities/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-a-literal-string-with-different-possibilities/index.md index f8bf60d647d..1073a22b19f 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-a-literal-string-with-different-possibilities/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-a-literal-string-with-different-possibilities/index.md @@ -14,7 +14,8 @@ localeTitle: تطابق سلسلة حرفية مع الاحتمالات المخ ## حل: - `let petString = "James has a pet cat."; - let petRegex = /dog|cat|bird|fish/; - let result = petRegex.test(petString); -` \ No newline at end of file +```javascriot +let petString = "James has a pet cat."; +let petRegex = /dog|cat|bird|fish/; +let result = petRegex.test(petString); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-all-non-numbers/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-all-non-numbers/index.md index f05b99ef662..91fd47bc9c2 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-all-non-numbers/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-all-non-numbers/index.md @@ -16,8 +16,9 @@ localeTitle: المباراة جميع غير الارقام ## حل - `let noNumRegex = /\D/g; -` +```javascript +let noNumRegex = /\D/g; +``` ## تفسير diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-all-numbers/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-all-numbers/index.md index 25c54579176..b60784ed943 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-all-numbers/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-all-numbers/index.md @@ -16,8 +16,9 @@ localeTitle: تطابق جميع الأرقام ## حل - `let numRegex = /\d/g; -` +```javascript +let numRegex = /\d/g; +``` ## تفسير diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-anything-with-wildcard-period/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-anything-with-wildcard-period/index.md index 0b26664bf95..e3a86ade5e1 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-anything-with-wildcard-period/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-anything-with-wildcard-period/index.md @@ -14,10 +14,11 @@ localeTitle: تطابق أي شيء مع فترة أحرف البدل ## حل - `let exampleStr = "Let's have fun with regular expressions!"; - let unRegex = /.un/; // Change this line - let result = unRegex.test(exampleStr); -` +```javascript +let exampleStr = "Let's have fun with regular expressions!"; +let unRegex = /.un/; // Change this line +let result = unRegex.test(exampleStr); +``` ## كسبلايناتيون diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-beginning-string-patterns/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-beginning-string-patterns/index.md index 92676f88fe6..f160446a345 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-beginning-string-patterns/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-beginning-string-patterns/index.md @@ -12,9 +12,10 @@ localeTitle: مباراة بداية أنماط سلسلة جرِّب محيطك المعتاد بالأشرطة المائلة - `let testExp = /^test/; - // returns true or false depending on whether test is found in the beginning of the string -` +```javascript +let testExp = /^test/; +// returns true or false depending on whether test is found in the beginning of the string +``` ### تلميح 2: @@ -24,7 +25,8 @@ localeTitle: مباراة بداية أنماط سلسلة ## حل - `let rickyAndCal = "Cal and Ricky both like racing."; - let calRegex = /^Cal/; // Change this line - let result = calRegex.test(rickyAndCal); -` \ No newline at end of file +```javascript +let rickyAndCal = "Cal and Ricky both like racing."; +let calRegex = /^Cal/; // Change this line +let result = calRegex.test(rickyAndCal); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-characters-that-occur-zero-or-more-times/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-characters-that-occur-zero-or-more-times/index.md index 607591e4854..baa15b0723b 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-characters-that-occur-zero-or-more-times/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-characters-that-occur-zero-or-more-times/index.md @@ -6,22 +6,24 @@ localeTitle: مطابقة الأحرف التي تحدث Zero أو أوقات إ لا يجب أن يحدث أي حرف في تعبير regex يتبعه `*` في السلسلة التي تم اختبارها ، في حين يجب أن يظهر أي حرف في تعبير regex متبوعًا بـ `+` في سلسلة واحدة على الأقل ، كما هو موضح أدناه ، - `let phrase = "ba humbug"; - - let regexPlus = /bah+/; - let regexStar = /bah*/; - - regexPlus.test(phrase); // returns false - regexStar.test(phrase); // returns true -` +```javascript +let phrase = "ba humbug"; + +let regexPlus = /bah+/; +let regexStar = /bah*/; + +regexPlus.test(phrase); // returns false +regexStar.test(phrase); // returns true +``` كلاهما يسمحان بأي عدد من الأحداث من نفس الحرف في صف ، على سبيل المثال ، - `let phrase = "wooooow look at that!"; - - let regexPlus = /wo+w/; - let regexStar = /wo*w/; - - regexPlus.test(phrase); // returns true - regexStar.test(phrase); // returns true -` \ No newline at end of file +```javascript +let phrase = "wooooow look at that!"; + +let regexPlus = /wo+w/; +let regexStar = /wo*w/; + +regexPlus.test(phrase); // returns true +regexStar.test(phrase); // returns true +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings/index.md index fbd75475997..3a30be9fb29 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings/index.md @@ -16,7 +16,8 @@ localeTitle: المباراة الحرفيه الاوتار ## حل: - `let waldoIsHiding = "Somewhere Waldo is hiding in this text."; - let waldoRegex = /Waldo/; // Change this line - let result = waldoRegex.test(waldoIsHiding); -` \ No newline at end of file +```javascript +let waldoIsHiding = "Somewhere Waldo is hiding in this text."; +let waldoRegex = /Waldo/; // Change this line +let result = waldoRegex.test(waldoIsHiding); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-numbers-and-letters-of-the-alphabet/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-numbers-and-letters-of-the-alphabet/index.md index c7089d5eca9..986a3dfa0c4 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-numbers-and-letters-of-the-alphabet/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-numbers-and-letters-of-the-alphabet/index.md @@ -21,16 +21,18 @@ localeTitle: أرقام المباراة ورسائل الأبجدية هل تذكر تمكين إشارات regexp مثل "i" لتجاهل الحالة و "g" لإرجاع قيم متعددة؟ إذا كان الأمر كذلك ، فهل تقوم بتضمين كل من مطابقة الأحرف للأرقام والحروف؟ - `let regexp = /[a-z1-100]/ig - // above code returns all characters from A to Z, along with all numbers from 1 to 100 - // this includes the letter A and Z and the numbers 1 and 100 -` +```javascript +let regexp = /[a-z1-100]/ig +// above code returns all characters from A to Z, along with all numbers from 1 to 100 +// this includes the letter A and Z and the numbers 1 and 100 +``` ### تنبيه المفسد - الحل إلى الأمام ## حل - `let quoteSample = "Blueberry 3.141592653s are delicious."; - let myRegex = /[h-s2-6]/ig; // Change this line - let result = quoteSample.match(myRegex); // Change this line -` \ No newline at end of file +```javascript +let quoteSample = "Blueberry 3.141592653s are delicious."; +let myRegex = /[h-s2-6]/ig; // Change this line +let result = quoteSample.match(myRegex); // Change this line +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-single-character-with-multiple-possibilities/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-single-character-with-multiple-possibilities/index.md index aa719c046d4..d5db47788ff 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-single-character-with-multiple-possibilities/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-single-character-with-multiple-possibilities/index.md @@ -20,7 +20,8 @@ localeTitle: تطابق شخصية واحدة مع إمكانيات متعددة ## حل - `let quoteSample = "Beware of bugs in the above code; I have only proved it correct, not tried it."; - let vowelRegex = /[aeiou]/ig; // Change this line - let result = quoteSample.match(vowelRegex); // Change this line -` \ No newline at end of file +```javascript +let quoteSample = "Beware of bugs in the above code; I have only proved it correct, not tried it."; +let vowelRegex = /[aeiou]/ig; // Change this line +let result = quoteSample.match(vowelRegex); // Change this line +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-single-characters-not-specified/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-single-characters-not-specified/index.md index bafe3a5c034..89e4e463d2f 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-single-characters-not-specified/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/match-single-characters-not-specified/index.md @@ -23,14 +23,16 @@ localeTitle: مطابقة أحرف مفردة غير محددة تأكد من التحقق مما إذا كان نطاق الأرقام صحيحًا - يطالبنا التحدي بإنهاء جميع الأرقام من 0 إلى 99. يمكن القيام بذلك باستخدام علامة الإبطال السلبي الموضوعة مباشرة بعد أول شريحة افتتاحية من كلمة regexp الخاصة بك. - `let numbersRegExp = /[^0-99]/ig; -` +```javacsript +let numbersRegExp = /[^0-99]/ig; +``` ### تنبيه المفسد - الحل إلى الأمام ## حل - `let quoteSample = "3 blind mice."; - let myRegex = /[^aeiou^0-99]/ig; // Change this line - let result = quoteSample.match(myRegex); // Change this line -` \ No newline at end of file +```javascript +let quoteSample = "3 blind mice."; +let myRegex = /[^aeiou^0-99]/ig; // Change this line +let result = quoteSample.match(myRegex); // Change this line +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/positive-and-negative-lookahead/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/positive-and-negative-lookahead/index.md index 671c091face..49eb2a24c4a 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/positive-and-negative-lookahead/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/positive-and-negative-lookahead/index.md @@ -11,7 +11,8 @@ localeTitle: الإيجابية و السلبية Lookahead ## حل : - `let sampleWord = "astronaut"; - let pwRegex = /(?=\w{5,})(?=\D*\d{2})/; - let result = pwRegex.test(sampleWord); -` \ No newline at end of file +```javascript +let sampleWord = "astronaut"; +let pwRegex = /(?=\w{5,})(?=\D*\d{2})/; +let result = pwRegex.test(sampleWord); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/remove-whitespace-from-start-and-end/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/remove-whitespace-from-start-and-end/index.md index 3bdde185fb2..fbab6778426 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/remove-whitespace-from-start-and-end/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/remove-whitespace-from-start-and-end/index.md @@ -18,7 +18,8 @@ localeTitle: إزالة Whitespace من البداية والنهاية ## حل: - `let hello = " Hello, World! "; - let wsRegex = /^\s+|\s+$/g; // Change this line - let result = hello.replace(wsRegex, ''); // Change this line -` \ No newline at end of file +```javascript +let hello = " Hello, World! "; +let wsRegex = /^\s+|\s+$/g; // Change this line +let result = hello.replace(wsRegex, ''); // Change this line +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/restrict-possible-usernames/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/restrict-possible-usernames/index.md index ddeecd1f6e9..0879da98e69 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/restrict-possible-usernames/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/restrict-possible-usernames/index.md @@ -15,13 +15,15 @@ localeTitle: تقييد أسماء المستخدمين المحتملين 1. الأرقام الوحيدة في اسم المستخدم يجب أن تكون في النهاية. `\d$` يمكن أن يكون هناك صفر أو أكثر منهم في النهاية. `*` - `/\d*$/; -` +```javascript +/\d*$/; +``` 2. يمكن أن تكون أحرف اسم المستخدم صغيرة وأحرف كبيرة. `i` - `/\d*$/i; -` +```javascript +/\d*$/i; +``` 3. يجب أن تتكون أسماء المستخدمين من حرفين على الأقل. `{2,}` يمكن لاسم المستخدم المكون من حرفين فقط استخدام أحرف الحروف الأبجدية. `^[az]` diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups/index.md index ebcd683fd59..2dea0a98572 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups/index.md @@ -8,10 +8,11 @@ localeTitle: إعادة استخدام الأنماط باستخدام مجمو كود المقدمة أدناه: - `let testString = "test test test "; - let reRegex =/(test)\s\1/; - let result = reRegex.test(testString); -` +```javascript +let testString = "test test test "; +let reRegex =/(test)\s\1/; +let result = reRegex.test(testString); +``` سوف تتطابق `result` مع `test test` فقط لأن `\1` في هذا المثال تشير إلى نفس النص الذي تم مؤخرًا تطابقه مع المجموعة الأولى `(test)` . @@ -27,10 +28,11 @@ localeTitle: إعادة استخدام الأنماط باستخدام مجمو نظرا للرمز أدناه: - `let testString = "test test test "; - let reRegex =/(test)(\s)\1\2\1/; - let result = reRegex.test(testString); -` +```javascript +let testString = "test test test "; +let reRegex =/(test)(\s)\1\2\1/; +let result = reRegex.test(testString); +``` سيطابق `test test test` كامل `test test test` بسبب: `\1` يكرر (اختبار) `\2` يكرر (\\ s) @@ -38,10 +40,11 @@ localeTitle: إعادة استخدام الأنماط باستخدام مجمو الكود أدناه: - `let testString = "test test test test test test"; - let reRegex =/(test)(\s)\1\2\1/g; - let result = reRegex.test(testString); -` +```javascript +let testString = "test test test test test test"; +let reRegex =/(test)(\s)\1\2\1/g; +let result = reRegex.test(testString); +``` نظرًا لأننا استخدمنا `\g` ، فلن يعود التعبير المعتاد الخاص بنا بعد أول مباراة كاملة ( `test test test` ) ويطابق كل التكرار. @@ -49,7 +52,8 @@ localeTitle: إعادة استخدام الأنماط باستخدام مجمو ## حل: - `let repeatNum = "42 42 42"; - let reRegex = /^(\d+)\s\1\s\1$/; - let result = reRegex.test(repeatNum); -` +```javascript +let repeatNum = "42 42 42"; +let reRegex = /^(\d+)\s\1\s\1$/; +let result = reRegex.test(repeatNum); +``` diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/specify-upper-and-lower-number-of-matches/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/specify-upper-and-lower-number-of-matches/index.md index fdca8006a7d..a3639d1fd8d 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/specify-upper-and-lower-number-of-matches/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/specify-upper-and-lower-number-of-matches/index.md @@ -8,15 +8,16 @@ localeTitle: تحديد العلوي والسفلي عدد من المباريا كل هذه السلاسل ستعود `true` : - `let threeAs = "aaa"; - let fourAs = "aaaa"; - let sevenAs = "aaaaaaa"; - - let myRegex = /a{2,4}/; - myRegex.test(threeAs) ; // true - myRegex.test(fourAs) ; // true - myRegex.test(sevenAs) ; // true -` +```javascript +let threeAs = "aaa"; +let fourAs = "aaaa"; +let sevenAs = "aaaaaaa"; + +let myRegex = /a{2,4}/; +myRegex.test(threeAs) ; // true +myRegex.test(fourAs) ; // true +myRegex.test(sevenAs) ; // true +``` ## Spolier Alert! @@ -24,7 +25,8 @@ localeTitle: تحديد العلوي والسفلي عدد من المباريا ## حل: - `let ohStr = "Ohhh no"; - let ohRegex = /Oh{3,6}\sno/; // Change this line - let result = ohRegex.test(ohStr); -` \ No newline at end of file +```javascript +let ohStr = "Ohhh no"; +let ohRegex = /Oh{3,6}\sno/; // Change this line +let result = ohRegex.test(ohStr); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/use-capture-groups-to-search-and-replace/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/use-capture-groups-to-search-and-replace/index.md index d8882accc5b..9889801bb78 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/use-capture-groups-to-search-and-replace/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/use-capture-groups-to-search-and-replace/index.md @@ -14,8 +14,9 @@ localeTitle: استخدم مجموعات الالتقاط للبحث واستب ## حل - `let huhText = "This sandwich is good."; - let fixRegex = /good/; // Change this line - let replaceText = "okey-dokey"; // Change this line - let result = huhText.replace(fixRegex, replaceText); -` \ No newline at end of file +```javascript +let huhText = "This sandwich is good."; +let fixRegex = /good/; // Change this line +let replaceText = "okey-dokey"; // Change this line +let result = huhText.replace(fixRegex, replaceText); +``` \ No newline at end of file diff --git a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/using-the-test-method/index.md b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/using-the-test-method/index.md index 16ef5841a2c..34fb17b8935 100644 --- a/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/using-the-test-method/index.md +++ b/guide/arabic/certifications/javascript-algorithms-and-data-structures/regular-expressions/using-the-test-method/index.md @@ -14,7 +14,8 @@ localeTitle: باستخدام طريقة الاختبار ## حل - `let myString = "Hello, World!"; - let myRegex = /Hello/; - let result = myRegex.test(myString); // Change this line -` \ No newline at end of file +```javascript +let myString = "Hello, World!"; +let myRegex = /Hello/; +let result = myRegex.test(myString); // Change this line +``` \ No newline at end of file diff --git a/guide/arabic/certifications/responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-carefully-choosing-colors-that-convey-information/index.md b/guide/arabic/certifications/responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-carefully-choosing-colors-that-convey-information/index.md index 03fd2144434..3bf25591286 100644 --- a/guide/arabic/certifications/responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-carefully-choosing-colors-that-convey-information/index.md +++ b/guide/arabic/certifications/responsive-web-design/applied-accessibility/avoid-colorblindness-issues-by-carefully-choosing-colors-that-convey-information/index.md @@ -10,7 +10,8 @@ localeTitle: تجنب مشاكل Colorblindness عن طريق اختيار ال يصبح السطر 4: - `color: #003366; -` +```css +color: #003366; +``` وسوف يصبح لون النص أكثر قتامة. \ No newline at end of file diff --git a/guide/arabic/certifications/responsive-web-design/applied-accessibility/make-links-navigatable-with-html-access-keys/index.md b/guide/arabic/certifications/responsive-web-design/applied-accessibility/make-links-navigatable-with-html-access-keys/index.md index 84c8d7b7fb4..cc9cc6b71c9 100644 --- a/guide/arabic/certifications/responsive-web-design/applied-accessibility/make-links-navigatable-with-html-access-keys/index.md +++ b/guide/arabic/certifications/responsive-web-design/applied-accessibility/make-links-navigatable-with-html-access-keys/index.md @@ -6,10 +6,12 @@ localeTitle: جعل الروابط نافيجيتابل مع مفاتيح الو اتباع التعليمات: إضافة سمة مفتاح الوصول إلى كلا الارتباطين وتعيين أول واحد إلى "g" (لـ Garfield) والثاني إلى "c" (لـ Chuck Norris). تصبح السطور 8 و 16: - `

The Garfield Files: Lasagna as Training Fuel?

-` +```css +

The Garfield Files: Lasagna as Training Fuel?

+``` - `

Is Chuck Norris a Cat Person?

-` +```css +

Is Chuck Norris a Cat Person?

+``` وبهذه الطريقة ، يمكن أن تحتوي الروابط الموجودة حول عبارتي مقالة المدونة على اختصارات لوحة المفاتيح حتى يتمكن مستخدمو موقعه من الانتقال سريعًا إلى القصة الكاملة. \ No newline at end of file