📅  最后修改于: 2022-03-11 15:04:08.778000             🧑  作者: Mango
//Number Line Jumps hackerrank solution javascript
function kangaroo(x1, v1, x2, v2) {
// Write your code here
for(let i = 1; i<=10000; i++){
if(x1 + i * v1 === x2 + i *v2){
return "YES";
}
}
return "NO";
}