---
title: "Comment by j on \"Difference between break and return in ruby\" | Hashnode"
description: "return exits from the testing function whilst return exits from the (0..200).each loop. don&#39;t you mean break exits the loop?"
url: "https://hashnode.com/posts/difference-between-break-and-return-in-ruby/5d9b27a69c373b3b0b66e3df/comment/5d9eca22d7abec6c7987e369"
---

[Discussion](https://hashnode.com/posts/difference-between-break-and-return-in-ruby/5d9b27a69c373b3b0b66e3df)

Comment [Difference between break and return in ruby](https://hashnode.com/posts/difference-between-break-and-return-in-ruby/5d9b27a69c373b3b0b66e3df)

[j](https://hashnode.com/@chilimatic)

[Oct 10, 2019](https://hashnode.com/posts/difference-between-break-and-return-in-ruby/5d9b27a69c373b3b0b66e3df/comment/5d9eca22d7abec6c7987e369)

> return exits from the testing function whilst return exits from the (0..200).each loop.

don't you mean break exits the loop?
