Title: [FEATURE]: Add Harshad numbers · Issue #1802 · TheAlgorithms/JavaScript · GitHub
Open Graph Title: [FEATURE]: Add Harshad numbers · Issue #1802 · TheAlgorithms/JavaScript
X Title: [FEATURE]: Add Harshad numbers · Issue #1802 · TheAlgorithms/JavaScript
Description: Motivation A Harshad number (also known as a Niven number) is an integer that is divisible by the sum of its digits. Harshad numbers are sometimes called “happy numbers” in recreational mathematics, because they have a simple, satisfying...
Open Graph Description: Motivation A Harshad number (also known as a Niven number) is an integer that is divisible by the sum of its digits. Harshad numbers are sometimes called “happy numbers” in recreational mathematics...
X Description: Motivation A Harshad number (also known as a Niven number) is an integer that is divisible by the sum of its digits. Harshad numbers are sometimes called “happy numbers” in recreational mathematics...
Opengraph URL: https://github.com/TheAlgorithms/JavaScript/issues/1802
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[FEATURE]: Add Harshad numbers","articleBody":"### Motivation\n\n- A Harshad number (also known as a Niven number) is an integer that is divisible by the sum of its digits.\n- Harshad numbers are sometimes called “happy numbers” in recreational mathematics, because they have a simple, satisfying property: their digit sum divides them evenly. They are widely studied in number theory and often appear in math puzzles, programming challenges, and teaching exercises.\n\n### Examples\n\n18 is a Harshad number because 1 + 8 = 9 and 18 % 9 === 0.\n\n19 is not, because 1 + 9 = 10 and 19 % 10 !== 0\n\n### Possible workarounds\n\n_No response_\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/ridge-kimani","@type":"Person","name":"ridge-kimani"},"datePublished":"2025-09-24T18:31:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1802/JavaScript/issues/1802"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f77d9770-7cfa-9494-f905-158194a088a1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AC7A:154085:4A85704:617928C:696D1CB5 |
| html-safe-nonce | 171edf31a2734ff7c7bd5383b59ac77d9a1d345e2ac1e0b5451216633315e35f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzdBOjE1NDA4NTo0QTg1NzA0OjYxNzkyOEM6Njk2RDFDQjUiLCJ2aXNpdG9yX2lkIjoiNTA5OTE1Nzc5ODkwNTUxOTI4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c3dabe8a7716d2158bdca15e75e169f38e90418c2ea165bf1d0bf29fc1bcabd3 |
| hovercard-subject-tag | issue:3450490729 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/TheAlgorithms/JavaScript/1802/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a37af3b61e6121098bf4e6f079d125644bb685da5bd34c38c75a896927b7e14b/TheAlgorithms/JavaScript/issues/1802 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a37af3b61e6121098bf4e6f079d125644bb685da5bd34c38c75a896927b7e14b/TheAlgorithms/JavaScript/issues/1802 |
| og:image:alt | Motivation A Harshad number (also known as a Niven number) is an integer that is divisible by the sum of its digits. Harshad numbers are sometimes called “happy numbers” in recreational mathematics... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ridge-kimani |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0944e430045f4fb5f7bd103e0660080acfe593174063212555773ca41c144a14 |
| turbo-cache-control | no-preview |
| go-import | github.com/TheAlgorithms/JavaScript git https://github.com/TheAlgorithms/JavaScript.git |
| octolytics-dimension-user_id | 20487725 |
| octolytics-dimension-user_login | TheAlgorithms |
| octolytics-dimension-repository_id | 97086543 |
| octolytics-dimension-repository_nwo | TheAlgorithms/JavaScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 97086543 |
| octolytics-dimension-repository_network_root_nwo | TheAlgorithms/JavaScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 66b6e773801d28660016072069017cfcc851f54b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width