{"id":13475999,"url":"https://github.com/waterlink/Challenge-Build-Your-Own-Array-In-Js","last_synced_at":"2025-03-27T01:30:45.424Z","repository":{"id":47259194,"uuid":"112092821","full_name":"waterlink/Challenge-Build-Your-Own-Array-In-Js","owner":"waterlink","description":"This is a challenge that will allow you to practice your logical, analytical and problem-solving skills. Additionally, by the end of it you’ll have much better command of arrays in javascript.","archived":false,"fork":false,"pushed_at":"2021-01-26T21:39:42.000Z","size":495,"stargazers_count":178,"open_issues_count":9,"forks_count":31,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-23T02:22:47.133Z","etag":null,"topics":["challenge","javascript","vanilla-js"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/waterlink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-26T15:12:49.000Z","updated_at":"2025-02-12T09:34:34.000Z","dependencies_parsed_at":"2022-08-30T09:30:40.374Z","dependency_job_id":null,"html_url":"https://github.com/waterlink/Challenge-Build-Your-Own-Array-In-Js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waterlink%2FChallenge-Build-Your-Own-Array-In-Js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waterlink%2FChallenge-Build-Your-Own-Array-In-Js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waterlink%2FChallenge-Build-Your-Own-Array-In-Js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/waterlink%2FChallenge-Build-Your-Own-Array-In-Js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/waterlink","download_url":"https://codeload.github.com/waterlink/Challenge-Build-Your-Own-Array-In-Js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245764607,"owners_count":20668448,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["challenge","javascript","vanilla-js"],"created_at":"2024-07-31T16:01:25.534Z","updated_at":"2025-03-27T01:30:43.627Z","avatar_url":"https://github.com/waterlink.png","language":"JavaScript","readme":"# Challenge “Build Your Own Array in Javascript!”\n\nRules are simple:\n\n- I give you a test suite for (almost) all the functionality of the array.\n- You implement that functionality in the class `MyArray`.\n- You can’t use standard javascript’s `Array`, instead you need to use the provided wrapper `PlainArray` that limits what you can do:\n\n```typescript\nclass PlainArray\u003cT\u003e {\n    constructor(capacity: number)\n    length: number\n    get(index: number): T\n    set(index: number, value: T)\n}\n```\n\n- `PlainArray` is a fixed-size array that has one property and two methods defined: `length, get(index) and set(index, value)`.\n- Even though the definition of that class is in Typescript, you will have to use vanilla ECMA Script 5.\n- Focus more on readability over the performance.\n\n## How to Run The Test Suite?\n\nFirst, you’ll need to clone this repository:\n\n```bash\n$ git clone https://github.com/waterlink/Challenge-Build-Your-Own-Array-In-Js\n$ cd Challenge-Build-Your-Own-Array-In-Js\n```\n\nYou will need to open [`SpecRunner.html`](./SpecRunner.html) in your browser. You can launch it from the directory in your file explorer, or you could run it from terminal:\n\n```bash\n# Mac OS X:\n$ open ./SpecRunner.html\n\n# Most Linuxes\n$ xdg-open ./SpecRunner.html\n```\n\nYou should see something like that:\n\n![](./img/everything-fails-in-the-browser.png)\n\nTo see the test suite open [`./spec/MyArraySpec.js`](./spec/MyArraySpec.js) and start making these failing tests pass one by one.\n\nI recommend starting with the top ones, as they get harder towards the bottom.\n\n## Why?\n\nSo that you can practice your logical and problem-solving skills. \n\nAdditionally, by the end of this challenge, you’ll have much more mastery over the use of arrays in javascript.\n\n## I’m Done. Now What?\n\nSend me a pull request to this GitHub repository. And take a look at everyone else’s solution, as well!\n\nJust don’t peek before you are done ;)\n\n## Thank you!","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaterlink%2FChallenge-Build-Your-Own-Array-In-Js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaterlink%2FChallenge-Build-Your-Own-Array-In-Js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaterlink%2FChallenge-Build-Your-Own-Array-In-Js/lists"}