Update top JS snippets
This commit is contained in:
@ -2,12 +2,12 @@
|
||||
title: arithmeticProgression
|
||||
tags: math,algorithm,beginner
|
||||
firstSeen: 2020-10-04T11:37:07+03:00
|
||||
lastUpdated: 2020-12-28T13:49:24+02:00
|
||||
lastUpdated: 2021-10-13T19:29:39+02:00
|
||||
---
|
||||
|
||||
Creates an array of numbers in the arithmetic progression, starting with the given positive integer and up to the specified limit.
|
||||
|
||||
- Use `Array.from()` to create an array of the desired length, `lim/n`, and a map function to fill it with the desired values in the given range.
|
||||
- Use `Array.from()` to create an array of the desired length, `lim/n`. Use a map function to fill it with the desired values in the given range.
|
||||
|
||||
```js
|
||||
const arithmeticProgression = (n, lim) =>
|
||||
|
||||
Reference in New Issue
Block a user