Update top JS snippets

This commit is contained in:
Chalarangelo
2021-10-13 20:09:28 +03:00
parent 2b775e3c93
commit 3cd481c0d1
19 changed files with 45 additions and 43 deletions

View File

@ -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) =>