Answers for "exponent form calculator in angular"

1

exponent form calculator in angular

function exp(b,n)
{
        var ans = 1;
        for (var i =1; i <= n; i++)
        {
                ans = b * ans;        
        }
        return ans;
}
console.log(exp(2, 3));
Posted by: Guest on October-04-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language