Me and my friends can't figure it out

We know it can be in programming, but what about pure math?

no, in math and programming. variables can be functions, there's no reason you can't say "let f = the function that outputs [something]" in math, or in many programming languages. but saying it the other way around doesn't really make sense.
If you mean "variable" as in the object of study that can vary (like solving an equation x+1=0 over R, your "variable" stand s in for a real number so that is the object of study) then yes. For example, people study spaces of functions like Lebesgue spaces, Sobolev spaces and Hardy spaces.  These spaces are equipped with a norm and inner product so the object of study are functions.

&#x200B;

In algebra this happens all of the time. Lets say we have a left R module M, we can study the space Hom(M,M) which is the space of module homomorphisms from M to itself, which is called the endomorphism ring of M. As the name says, the endomorphism ring is a ring under the operations of pointwise addition and composition. Thus if you'd like you can solve equations here which makes the variables the endomorphisms.
no a function is not a variable, but i am pretty sure it requires at least 2 variables. Variable just means a placeholder or unfixed value (it varies). Functions describe the relationship between variables.

edit: I guess something like y(x) = 4 where every value of x you put in y = 4, there could be considered 1 variable? (x). Where any value of f(x) is constantly 4 but i'd need some help with that and i am not sure how useful that is in understanding what a function vs a variable is.
Sure, you can even define functions that take a function as input and return a function. In this case, the domain and codomain are both function spaces. A very easy example would be a function g that takes as input a function f and returns the function 2 times two, so g(f) = 2\*f.

More interesting would be a function from the continuously differentiable functions on the open interval (0,1) into the continuous functions on that interval that returns the derivative of the input function. Since differentiation is linear, such a mapping would even be linear. Stuff like this is done in functional analysis where one looks at linear operators between function spaces.
When you're starting out in mathematics, the answer is obviously no. As you go on in mathematics, you'll realise that the answer is yes.

As a few people here have hinted, treating functions as variations in computer science, is an application of functions as variables in maths.

The reason for this is that computer science (or the computation part of it, at least) is a branch of applied mathematics. So the answer has two parts: if it's possible in CS, it's possible in maths by definition *because CS is maths*; and it being possible in mathematics is what makes it possible in computer science.
The argument of the functions rappresent the variable