Files
freecodecamp--freecodecamp/curriculum/challenges/english/blocks/daily-coding-challenges-javascript/699c8e045ee7cb94ed2322d9.md
T
wehub-resource-sync dde272c4b8
i18n - Build Validation / Validate i18n Builds (24) (push) Has been cancelled
CI - Node.js / Lint (24) (push) Has been cancelled
CI - Node.js / Build (24) (push) Has been cancelled
CI - Node.js / Test (24) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (24) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 24) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 24) (push) Has been cancelled
CD - Docker - GHCR Images / Build and Push Images (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 11:55:53 +08:00

68 lines
1.0 KiB
Markdown

---
id: 699c8e045ee7cb94ed2322d9
title: "Challenge 218: Evenly Divisible"
challengeType: 28
dashedName: challenge-218
---
# --description--
Given two integers, determine if you can evenly divide the first one by the second one.
# --hints--
`isEvenlyDivisible(4, 2)` should return `true`.
```js
assert.isTrue(isEvenlyDivisible(4, 2));
```
`isEvenlyDivisible(7, 3)` should return `false`.
```js
assert.isFalse(isEvenlyDivisible(7, 3));
```
`isEvenlyDivisible(5, 10)` should return `false`.
```js
assert.isFalse(isEvenlyDivisible(5, 10));
```
`isEvenlyDivisible(48, 6)` should return `true`.
```js
assert.isTrue(isEvenlyDivisible(48, 6));
```
`isEvenlyDivisible(3186, 9)` should return `true`.
```js
assert.isTrue(isEvenlyDivisible(3186, 9));
```
`isEvenlyDivisible(4192, 11)` should return `false`.
```js
assert.isFalse(isEvenlyDivisible(4192, 11));
```
# --seed--
## --seed-contents--
```js
function isEvenlyDivisible(a, b) {
return a;
}
```
# --solutions--
```js
function isEvenlyDivisible(a, b) {
return a % b === 0;
}
```