Post History
JavaScript (Node.js), 27 25 bytes (-2 thanks to JoKing) f=(a,b)=>a<0?0:1+f(b,a-b) Try it online!
Answer
#2: Post edited
# [JavaScript (Node.js)], 27 bytes- ```javascript
f=(a,b)=>(a<0?0:1+f(b,a-b))- ```
[Try it online!][TIO-khha3kqp]- [JavaScript (Node.js)]: https://nodejs.org
[TIO-khha3kqp]: https://tio.run/##bcxBDoIwEEDRvSeZCVMz02IABT3LFKnRNNQI4fo1bi3b95P/0k2X8fN8r2ZO9ynnMICSx@EK2vONz1IF8KTGI@YxzUuK0zGmBwQQy9QI4uXw5yxU29JPzFR3XRlc29DOx5ER2@4EY8n9NH8B "JavaScript (Node.js) – Try It Online"
- # [JavaScript (Node.js)], <strike>27</strike> 25 bytes
- (-2 thanks to JoKing)
- ```javascript
- f=(a,b)=>a<0?0:1+f(b,a-b)
- ```
- [Try it online!][TIO-khlfdu5q]
- [JavaScript (Node.js)]: https://nodejs.org
- [TIO-khlfdu5q]: https://tio.run/##bcxBDoMgEEDRfU8C6dDMgI1ai55lQGnaGGmk6fUxbpXt@8n/8J@TX9/fn1riOOUcrGBw0vb8xAEfdA3CASsns49LivN0m@NLBEEaoSYpu8vBkaDSZ78jQtW252CaGgofA4p0UwhKg9k1bw "JavaScript (Node.js) – Try It Online"
#1: Initial revision
# [JavaScript (Node.js)], 27 bytes ```javascript f=(a,b)=>(a<0?0:1+f(b,a-b)) ``` [Try it online!][TIO-khha3kqp] [JavaScript (Node.js)]: https://nodejs.org [TIO-khha3kqp]: https://tio.run/##bcxBDoIwEEDRvSeZCVMz02IABT3LFKnRNNQI4fo1bi3b95P/0k2X8fN8r2ZO9ynnMICSx@EK2vONz1IF8KTGI@YxzUuK0zGmBwQQy9QI4uXw5yxU29JPzFR3XRlc29DOx5ER2@4EY8n9NH8B "JavaScript (Node.js) – Try It Online"