1.3 KiB
1.3 KiB
id | title | challengeType | guideUrl | videoUrl | localeTitle |
---|---|---|---|---|---|
56bbb991ad1ed5201cd392ca | Access Array Data with Indexes | 1 | https://arabic.freecodecamp.org/guide/certificates/access-array-data-with-indexes |
Description
undefined
Instructions
undefined
Tests
tests:
- text: ''
testString: 'assert((function(){if(typeof myArray !== "undefined" && typeof myData !== "undefined" && myArray[0] === myData){return true;}else{return false;}})(), "The variable <code>myData</code> should equal the first value of <code>myArray</code>.");'
- text: يجب الوصول إلى البيانات في متغير <code>myArray</code> باستخدام تدوين قوس.
testString: 'assert((function(){if(code.match(/\s*=\s*myArray\[0\]/g)){return true;}else{return false;}})(), "The data in variable <code>myArray</code> should be accessed using bracket notation.");'
Challenge Seed
// Example
var ourArray = [50,60,70];
var ourData = ourArray[0]; // equals 50
// Setup
var myArray = [50,60,70];
// Only change code below this line.
After Test
console.info('after the test');
Solution
// solution required