Nest all content into snippets

This commit is contained in:
Angelos Chalaris
2023-05-07 16:07:29 +03:00
parent 2ecadbada9
commit 6a45d2ec07
1240 changed files with 0 additions and 0 deletions

21
snippets/js/s/is-even.md Normal file
View File

@ -0,0 +1,21 @@
---
title: Number is even
type: snippet
language: javascript
tags: [math]
cover: by-the-lighthouse
dateModified: 2020-10-20T23:02:01+03:00
---
Checks if the given number is even.
- Checks whether a number is odd or even using the modulo (`%`) operator.
- Returns `true` if the number is even, `false` if the number is odd.
```js
const isEven = num => num % 2 === 0;
```
```js
isEven(3); // false
```