UNPKG
ap-nth-term
Version:
latest (1.0.1)
1.0.1
1.0.0
Find nth term of arithmetic progression from given array
ap-nth-term
/
test.ts
4 lines
(3 loc)
•
125 B
text/typescript
View Raw
1
2
3
4
import
{ findNthAP }
from
"./dist"
;
console
.
log
(
findNthAP
([
2
,
4
,
6
],
5
));
// 10
console
.
log
(
findNthAP
([
3
,
7
,
11
],
4
));
// 15