{"id":21108609,"url":"https://github.com/ai-balushi/prefix-postfix","last_synced_at":"2026-06-29T18:01:41.325Z","repository":{"id":230166459,"uuid":"773745723","full_name":"AI-Balushi/Prefix-Postfix","owner":"AI-Balushi","description":"This project illustrates the difference between prefix and postfix operators in TypeScript. Prefix operators increment the value before it is used, while postfix operators increment the value after it is used. The code examples demonstrate these concepts with simple arithmetic operations.","archived":false,"fork":false,"pushed_at":"2024-03-19T05:34:14.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-01T07:02:58.774Z","etag":null,"topics":["postfix","prefix"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/AI-Balushi.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}},"created_at":"2024-03-18T10:22:16.000Z","updated_at":"2024-03-19T06:44:25.000Z","dependencies_parsed_at":"2025-11-19T12:00:23.714Z","dependency_job_id":null,"html_url":"https://github.com/AI-Balushi/Prefix-Postfix","commit_stats":null,"previous_names":["ai-balushi/prefix-postfix"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AI-Balushi/Prefix-Postfix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AI-Balushi%2FPrefix-Postfix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AI-Balushi%2FPrefix-Postfix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AI-Balushi%2FPrefix-Postfix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AI-Balushi%2FPrefix-Postfix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AI-Balushi","download_url":"https://codeload.github.com/AI-Balushi/Prefix-Postfix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AI-Balushi%2FPrefix-Postfix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34937374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["postfix","prefix"],"created_at":"2024-11-20T00:47:51.713Z","updated_at":"2026-06-29T18:01:41.304Z","avatar_url":"https://github.com/AI-Balushi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Prefix \u0026 Postfix Increment Examples\nThis code snippet demonstrates the difference between prefix and postfix increment operators in JavaScript.\n\nPrefix Example\nlet a = 10;\n++a;\nconsole.log(a); // Output: 11\nIn the prefix example, ++a increments the value of a before it's used in the expression. So, the value of a becomes 11.\n\nPostfix Example\nlet b = 10;\nb++;\nconsole.log(b); // Output: 11\nIn the postfix example, b++ uses the current value of b in the expression, then increments b. So, the value of b becomes 11.\n\nMore Examples\nlet x = 5;\nlet y = ++x;\nconsole.log(x); // Output: 6\nconsole.log(y); // Output: 6\nIn the prefix increment, ++x increments x first (to 6), then assigns the new value of x to y.\n\nlet m = 5;\nlet n = m++;\nconsole.log(m); // Output: 6\nconsole.log(n); // Output: 5\nIn the postfix increment, m++ assigns the current value of m to n (5), then increments m.\n\nThis README provides a brief explanation of prefix and postfix increment examples along with their outputs.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai-balushi%2Fprefix-postfix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fai-balushi%2Fprefix-postfix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai-balushi%2Fprefix-postfix/lists"}