{"id":20285503,"url":"https://github.com/iftekheraziz/common-types-of-error-in-javascript","last_synced_at":"2025-03-04T04:10:00.314Z","repository":{"id":170307056,"uuid":"609931430","full_name":"IftekherAziz/Common-Types-of-Error-in-JavaScript","owner":"IftekherAziz","description":"Common Types of Error in JavaScript","archived":false,"fork":false,"pushed_at":"2023-03-06T05:41:23.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T08:12:15.344Z","etag":null,"topics":["chrome-devtools","debugging","debugging-tool","javascript","modern-javascript"],"latest_commit_sha":null,"homepage":"","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/IftekherAziz.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":"2023-03-05T17:01:24.000Z","updated_at":"2023-05-28T11:12:31.000Z","dependencies_parsed_at":"2023-07-25T18:32:59.538Z","dependency_job_id":null,"html_url":"https://github.com/IftekherAziz/Common-Types-of-Error-in-JavaScript","commit_stats":null,"previous_names":["iftekheraziz/common-types-of-error-in-javascript"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IftekherAziz%2FCommon-Types-of-Error-in-JavaScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IftekherAziz%2FCommon-Types-of-Error-in-JavaScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IftekherAziz%2FCommon-Types-of-Error-in-JavaScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IftekherAziz%2FCommon-Types-of-Error-in-JavaScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IftekherAziz","download_url":"https://codeload.github.com/IftekherAziz/Common-Types-of-Error-in-JavaScript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241780512,"owners_count":20019061,"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":["chrome-devtools","debugging","debugging-tool","javascript","modern-javascript"],"created_at":"2024-11-14T14:27:08.792Z","updated_at":"2025-03-04T04:10:00.294Z","avatar_url":"https://github.com/IftekherAziz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Module 40\n \n Debugging: \n\n - Debugging is the process of finding and resolving errors or bugs in software code, scripts, or programs. It involves identifying and analyzing the root cause of a problem, diagnosing the issue, and fixing it so that the software performs as expected.\n\nSome Debug Methods:\n\n- Using the console command\n- Setting the breakpoint\n- Using the debugger Keyword\n- Backtracking \n\nCommon Types of Errors:\n\nThere are several types of errors that can occur in JavaScript:\n\n- Syntax errors\n- Runtime errors\n- Logical errors\n- Type errors\n- Reference errors\n- Range errors\n- Network errors\n\n\n\u003c!-- Quiz --\u003e\n\n1. What type of error is commonly caused by referencing a variable or function that has not been defined?\n\n- ReferenceError\n\n2. What type of error is commonly caused by trying to perform an operation on a value that is not of the expected type?\n\n- TypeError\n\n3. What type of error is commonly caused by trying to access an array element that does not exist?\n\n- TypeError\n\n4. What type of error is commonly caused by trying to call a function that does not exist?\n\n- ReferenceError\n\n5. What type of error will the following code throw?\n\nconst num = 10;\nnum();\n\n- TypeError\n\n6. What type of error will the following code snippet produce?\n\nlet x = 10;\nx = y + 5;\nconsole.log(x);\n\n- ReferenceError\n\n7. What type of error will the following code snippet produce?\n\nconst obj = { name: 'John' };\nObject.keys(obj).forEach(prop =\u003e console.log(prop));\n\n- None of the above \n\n8. What type of error will the following code snippet produce?\n\nconst name = 'John';\nname.toUpperCase = () =\u003e 'JOHN';\nconsole.log(name.toUpperCase());\n\n- None of the above\n\n9. What type of error will the following code snippet produce?\n\nconst arr = [1, 2, 3];\narr.slice(-2, 0);\n\n- RangeError\n\n10. What type of error will the following code snippet produce?\n\nconst greeting = 'Hello, world!';\n\n- None of the above","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiftekheraziz%2Fcommon-types-of-error-in-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiftekheraziz%2Fcommon-types-of-error-in-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiftekheraziz%2Fcommon-types-of-error-in-javascript/lists"}