UNPKG

ap-nth-term

Version:

Find nth term of arithmetic progression from given array

4 lines (3 loc) 125 B
import { findNthAP } from "./dist"; console.log(findNthAP([2, 4, 6], 5)); // 10 console.log(findNthAP([3, 7, 11], 4)); // 15