---
title: "Comment by Ram Chandna on \"What are Pure Functions and Side Effects in JavaScript?\" | Hashnode"
description: "Wanted to ask something.... Is a method which reverses a \"given\" Number pure Or impure... Because according to me it is returning same value for same input so i"
url: "https://hashnode.com/posts/what-are-pure-functions-and-side-effects-in-javascript/61b337498ef4ad168430e4e3/comment/65f1ad3c0b563ef30db45669"
---

[Discussion](https://hashnode.com/posts/what-are-pure-functions-and-side-effects-in-javascript/61b337498ef4ad168430e4e3)

Comment [What are Pure Functions and Side Effects in JavaScript?](https://hashnode.com/posts/what-are-pure-functions-and-side-effects-in-javascript/61b337498ef4ad168430e4e3)

[Ram Chandna](https://hashnode.com/@ram377)

[Mar 13, 2024](https://hashnode.com/posts/what-are-pure-functions-and-side-effects-in-javascript/61b337498ef4ad168430e4e3/comment/65f1ad3c0b563ef30db45669)

Wanted to ask something.... Is a method which reverses a "given" Number pure Or impure... Because according to me it is returning same value for same input so it should be pure.... But then there is an argument that it might be impure

[Tapas Adhikary](https://hashnode.com/@atapas)

[Mar 13, 2024](https://hashnode.com/posts/what-are-pure-functions-and-side-effects-in-javascript/61b337498ef4ad168430e4e3/comment/65f1ad3c0b563ef30db45669#reply-65f1f47c718bcc45ab034b99)

It's a pure function as long as it returns the same output for the same input. Btw, what did you mean by impure argument?
