JavaScript Easy Beats 95.5%
\n\nconst checkArithmeticSubarrays = (nums, l, r) => {\n      \n  const chechArithmetic = ar => {\n    const diff = ar[1] - ar[0];\n    for(let i = 2; i < ar.le
```\n\nconst checkArithmeticSubarrays = (nums, l, r) => {\n      \n  const chechArithmetic = ar => {\n    const diff = ar[1] - ar[0];\n    for(let i = 2; i < ar.length; i++)\n      if(ar[i] - ar[i-1] != diff)\n        return false;\n    return true;\n  }\n  \n  return l.map((_,i) => chechArithmetic(nums.slice(l[i], r[i]+1).sort((a,b) => a-b)) )\n};\n```
['JavaScript']