locutus
Version:
Locutus other languages' standard libraries to JavaScript for fun and educational purposes
16 lines (15 loc) • 601 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.pow = pow;
const _operator_ts_1 = require("../_helpers/_operator.js");
function pow(a, b) {
// discuss at: https://locutus.io/python/operator/pow/
// parity verified: Python 3.12
// original by: Kevin van Zonneveld (https://kvz.io)
// note 1: Raises the left operand to the power of the right operand.
// example 1: pow(2, 5)
// returns 1: 32
// example 2: pow(9, 0.5)
// returns 2: 3
return (0, _operator_ts_1.pythonPow)(a, b, 'pow');
}