{"id":19404877,"url":"https://github.com/jswesterfield/planets-js","last_synced_at":"2025-07-25T07:37:56.521Z","repository":{"id":87182799,"uuid":"78266215","full_name":"JSWesterfield/planets-js","owner":"JSWesterfield","description":"planets-array.js. Some practice with array methods. ","archived":false,"fork":false,"pushed_at":"2017-01-07T08:19:19.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-07T13:12:09.666Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JSWesterfield.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-07T07:48:00.000Z","updated_at":"2017-01-07T07:48:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"75ca35ce-ee57-4d9f-9fe4-71de7a8abd52","html_url":"https://github.com/JSWesterfield/planets-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/JSWesterfield%2Fplanets-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSWesterfield%2Fplanets-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSWesterfield%2Fplanets-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JSWesterfield%2Fplanets-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JSWesterfield","download_url":"https://codeload.github.com/JSWesterfield/planets-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240582047,"owners_count":19824145,"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":[],"created_at":"2024-11-10T11:36:34.852Z","updated_at":"2025-02-25T00:44:27.281Z","avatar_url":"https://github.com/JSWesterfield.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# planets-js\nplanets-array.js. Some practice with array methods. \n\n![alt text](http://25.media.tumblr.com/f84cef4ac540f26e94ae11955425d9a9/tumblr_n2v0ziFCtk1sw0e4co1_500.jpg \"Logo Title Text 1\")\n\n\n**Steps in js**\n\n1.  Created an array of planets\n2.  Created a function for logging the planets array\n3.  _.unshift method_. Added \"The Sun\" to the beginning of the planets array\n4.  _.push method_. Added \"Pluto\" to the end of the planets array\n5.  _.shift method_. Removed \"The Sun\" from the beginning of the planets array.\n6.  _.pop method_. Removed \"Pluto\" from the end of the planets array.\n7.  _.indexOf method_. Found and logged the index of \"Venus\" in the planets array.\n8.  _.splice method(remove)_. Created an index of pre-sliced element, then used the splice method to remove the planet after \"Venus\".\n9.  _.splice method(add)_. Used splice to add back the planet after \"Venus\".\n10. _.reverse method_. Reversed the order of the planets array.\n11. _.sort method_. sorted the planets array.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjswesterfield%2Fplanets-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjswesterfield%2Fplanets-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjswesterfield%2Fplanets-js/lists"}