{"id":22123169,"url":"https://github.com/penn201500/js-startup","last_synced_at":"2026-05-02T15:35:09.648Z","repository":{"id":251999289,"uuid":"839088478","full_name":"penn201500/JS-Startup","owner":"penn201500","description":"This project is designed for beginners who are looking to learn and understand fundamental JavaScript methods, functions, and definitions. ","archived":false,"fork":false,"pushed_at":"2024-08-27T10:10:35.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-29T13:08:15.930Z","etag":null,"topics":["javascript","javascript-methods","js"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/penn201500.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-07T00:21:44.000Z","updated_at":"2024-08-27T10:10:38.000Z","dependencies_parsed_at":"2024-08-27T11:40:03.874Z","dependency_job_id":null,"html_url":"https://github.com/penn201500/JS-Startup","commit_stats":null,"previous_names":["penn201500/js-startup"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penn201500%2FJS-Startup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penn201500%2FJS-Startup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penn201500%2FJS-Startup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penn201500%2FJS-Startup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/penn201500","download_url":"https://codeload.github.com/penn201500/JS-Startup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245226782,"owners_count":20580751,"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":["javascript","javascript-methods","js"],"created_at":"2024-12-01T15:29:41.421Z","updated_at":"2026-05-02T15:35:09.622Z","avatar_url":"https://github.com/penn201500.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# JavaScript Starter Methods and Functions\n\nWelcome to the **JavaScript Starter Methods and Functions** repository! This project is designed for beginners who are looking to learn and understand fundamental JavaScript methods, functions, and definitions. The repository contains various examples and explanations of essential JavaScript array methods, string methods, and other utility functions that are frequently used in day-to-day programming.\n\n## Table of Contents\n\n- [JavaScript Starter Methods and Functions](#javascript-starter-methods-and-functions)\n  - [Table of Contents](#table-of-contents)\n  - [Introduction](#introduction)\n  - [Getting Started](#getting-started)\n  - [Array Methods](#array-methods)\n    - [push](#push)\n    - [pop](#pop)\n    - [unshift](#unshift)\n    - [shift](#shift)\n    - [sort](#sort)\n    - [splice](#splice)\n    - [concat](#concat)\n    - [join](#join)\n    - [slice](#slice)\n  - [String Methods](#string-methods)\n    - [charAt](#charAt)\n    - [concat](#concat-1)\n    - [includes](#includes)\n    - [indexOf](#indexOf)\n    - [slice](#slice-1)\n    - [split](#split)\n  - [Utility Functions](#utility-functions)\n    - [parseInt](#parseInt)\n    - [parseFloat](#parseFloat)\n    - [isNaN](#isNaN)\n    - [isFinite](#isFinite)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n## Introduction\n\nThis repository aims to provide a comprehensive collection of JavaScript methods and functions that are essential for beginners. Each method and function is explained with code examples, making it easier for new developers to grasp the concepts and start using them in their projects.\n\n## Getting Started\n\nTo get started with this repository, clone it to your local machine:\n\n```bash\ngit clone https://github.com/penn201500/JS-Startup\n```\n\nYou can view the source code files and run them in your preferred JavaScript environment.\n\n## Array Methods\n\n### push\n\nThe push method adds one or more elements to the end of an array and returns the new length of the array.\n\n```js\nlet array = [1, 2]\narray.push(\"A\", \"B\")\nconsole.log(array) // Output: [1, 2, 'A', 'B']\n```\n\n### pop\n\nThe pop method removes the last element from an array and returns that element. This method changes the length of the array.\n\n```js\nlet array = [1, 2, \"A\", \"B\"]\nconsole.log(array.pop()) // Output: 'B'\nconsole.log(array) // Output: [1, 2, 'A']\n```\n\n### unshift\n\nThe unshift method adds one or more elements to the beginning of an array and returns the new length of the array.\n\n```js\nlet array = [1, 2]\narray.unshift(\"A\", \"B\")\nconsole.log(array) // Output: ['A', 'B', 1, 2]\n```\n\n### shift\n\nThe shift method removes the first element from an array and returns that element. This method changes the length of the array.\n\n```js\nlet array = [\"A\", \"B\", 1, 2]\nconsole.log(array.shift()) // Output: 'A'\nconsole.log(array) // Output: ['B', 1, 2]\n```\n\n### sort\n\nThe sort method sorts the elements of an array in place and returns the sorted array.\n\n```js\nlet array = [3, 1, 4, 1, 5]\narray.sort()\nconsole.log(array) // Output: [1, 1, 3, 4, 5]\n```\n\n### splice\n\nThe splice method changes the contents of an array by removing or replacing existing elements and/or adding new elements in place.\n\n```js\nlet array = [\"Microsoft\", \"Apple\", \"Yahoo\", \"AOL\", \"Excite\", \"Oracle\"]\narray.splice(2, 3, \"Google\", \"Facebook\")\nconsole.log(array) // Output: ['Microsoft', 'Apple', 'Google', 'Facebook', 'Oracle']\n```\n\n### concat\n\nThe concat method is used to merge two or more arrays. This method does not change the existing arrays but instead returns a new array.\n\n```js\nlet array1 = [1, 2, 3]\nlet array2 = [4, 5, 6]\nlet array3 = array1.concat(array2)\nconsole.log(array3) // Output: [1, 2, 3, 4, 5, 6]\n```\n\n### join\n\nThe join method joins all elements of an array into a string and returns this string.\n\n```js\nlet array = [\"Microsoft\", \"Apple\", \"Yahoo\"]\nlet str = array.join(\"-\")\nconsole.log(str) // Output: 'Microsoft-Apple-Yahoo'\n```\n\n### slice\n\nThe slice method returns a shallow copy of a portion of an array into a new array object selected from start to end (end not included) where start and end represent the index of items in that array.\n\n```js\nlet array = [\"apple\", \"banana\", \"cherry\", \"date\", \"fig\"]\nlet slicedArray = array.slice(1, 3)\nconsole.log(slicedArray) // Output: ['banana', 'cherry']\n```\n\n## String Methods\n\n### charAt\n\nThe charAt method returns the character at the specified index in a string.\n\n```js\nlet str = 'Hello World';\nconsole.log(str.charAt(1)); // Output: 'e'\n```\n\n### concat\n\nThe concat method combines the text of two or more strings and returns a new string.\n\n```js\nlet str1 = 'Hello';\nlet str2 = 'World';\nlet str3 = str1.concat(' ', str2);\nconsole.log(str3); // Output: 'Hello World'\n```\n\n### includes\n\nThe includes method determines whether one string may be found within another string, returning true or false as appropriate.\n\n```js\nlet str = 'Hello World';\nconsole.log(str.includes('World')); // Output: true\n```\n\n### indexOf\n\nThe indexOf method returns the index within the calling String object of the first occurrence of the specified value, or -1 if not found.\n\n```js\nlet str = 'Hello World';\nconsole.log(str.indexOf('World')); // Output: 6\n```\n\n### slice\n\nThe slice method extracts a section of a string and returns it as a new string, without modifying the original string.\n\n```js\nlet str = 'Hello World';\nlet slicedStr = str.slice(1, 5);\nconsole.log(slicedStr); // Output: 'ello'\n```\n\n### split\n\nThe split method splits a String object into an array of strings by separating the string into substrings.\n\n```js\nlet str = 'Hello World';\nlet arr = str.split(' ');\nconsole.log(arr); // Output: ['Hello', 'World']\n```\n\n## Utility Functions\n\n### parseInt\n\nThe parseInt function parses a string argument and returns an integer of the specified radix.\n\n```js\nconsole.log(parseInt('10')); // Output: 10\nconsole.log(parseInt('10.5')); // Output: 10\n```\n\n### parseFloat\n\nThe parseFloat function parses a string argument and returns a floating point number.\n\n```js\nconsole.log(parseFloat('10.5')); // Output: 10.5\nconsole.log(parseFloat('10')); // Output: 10\n```\n\n### isNaN\n\nThe isNaN function determines whether a value is NaN (Not-a-Number).\n\n```js\nconsole.log(isNaN('Hello')); // Output: true\nconsole.log(isNaN(123)); // Output: false\n```\n\n### isFinite\n\nThe isFinite function determines whether a number is a finite, legal number.\n\n```js\nconsole.log(isFinite(123)); // Output: true\nconsole.log(isFinite(Infinity)); // Output: false\n```\n\n## Contributing\n\nFeel free to fork this repository and make changes as needed. Contributions are welcome!\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpenn201500%2Fjs-startup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpenn201500%2Fjs-startup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpenn201500%2Fjs-startup/lists"}