You can have it all!
//PURE FUNCTION !!!!!!!!!
const addTwoNumbers = function(a,b){
return a + b
}
addTwoNumbers(1,3) //This will ALWAYS be 4
//IMPURE FUNCTIONS !!!!!!!!!
let userName = 'Functor The Funky '
const AddToUserName = function(stringToAdd){
return userName += stringToAdd
}
const removeFromUserName = function(stringToAdd){
return userName -= stringToAdd
}
mutateUserName(userName,'Function') //'Functor The Funky Function'