I'm really glad you liked the article.
So to answer your question, as long as your function produces the same output even without an input value and that too without accessing anything from the outside view , it is a pure function.
const num =7 ;
const sentence = () => {return 'It is a good day' ; }
Here sentence function doesn't have an input value, but it'll produce the same result always. Hence a pure function.
Favourite Jome
Software Engineer @bug0
Thanks for sharing this article, I've learnt new things about the paradigm.
Quick question, is it compulsory that a function must take in an input before it's called a pure function, all the time?
Or can a function which doesn't have an input and returns an output with no dealing with side effects be called functional programming?