68
essuraj
7y

That moment when you realise f(x)=x²
that you did in 4th grade and now
Function(x){
return x*x;
}
....😯😮😲😱😵...
You realise that Everyone has been doing programming all their life....

Comments
  • 17
    Programming basically is solving Math problems
  • 5
    4th grade?
  • 0
    Noiiiceeeee dude lol. Mindblowing right.😲😲😲😲
  • 0
    I think it's the other way around 😅
  • 4
    Computer science is a subdivision of math. You are still doing math just don't see it... ;)
  • 0
    Yeah, mathematics and computing are related, but what's up with that function? I can't image a situation where declaring a function for that would be useful. At least go a little more generic:
    function pow(x,y) {
    var z = x;
    while (y > 1) {
    z *= x;
    y--;
    }
    return z;
    }

    (Yep, this only does positive powers, still)

    Or just use Math.pow(). (That's js but all languages have math libraries)
Add Comment