Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 391 Bytes

FrogJmp.md

File metadata and controls

13 lines (10 loc) · 391 Bytes

Count minimal number of jumps from position X to Y.

Solution (JavaScript)

A simple challenge that requires a basic calculation rather than any form of iteration.

Test Score: 100%

function solution(X, Y, D) {
    return Math.ceil((Y-X)/D)
}