Published on January 26, 2024By DeveloperBreeze

// Function to calculate the power of a number
function calculatePower(base, exponent) {
    return Math.pow(base, exponent);
}

// Example: Calculate the power of 2 raised to the 3rd exponent
const result = calculatePower(2, 3);

// Log the result to the console
console.log('Power of Number:', result);

Comments

Please log in to leave a comment.