Format snippets
This commit is contained in:
@ -12,9 +12,9 @@ Returns an error if `step` equals `1`.
|
||||
|
||||
```js
|
||||
const geometricProgression = (end, start = 1, step = 2) =>
|
||||
Array.from({ length: Math.floor(Math.log(end / start) / Math.log(step)) + 1 }).map(
|
||||
(_, i) => start * step ** i
|
||||
);
|
||||
Array.from({
|
||||
length: Math.floor(Math.log(end / start) / Math.log(step)) + 1,
|
||||
}).map((_, i) => start * step ** i);
|
||||
```
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user