I am confused what impure function really are! Can someone clear it please! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

I am confused what impure function really are! Can someone clear it please!

31st Jul 2020, 1:47 PM
Piyush Pandey
Piyush Pandey - avatar
2 Answers
31st Jul 2020, 2:11 PM
QWKKK
QWKKK - avatar
+ 5
Pure functions are those that have a return or yield statement whereas impure are those which give the output but don't return it! They either print it or change the variable values
31st Jul 2020, 2:30 PM
Namit Jain
Namit Jain - avatar