UNPKG

locutus

Version:

Locutus other languages' standard libraries to JavaScript for fun and educational purposes

13 lines (12 loc) 486 B
import { pythonPow } from "../_helpers/_operator.js"; export 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 pythonPow(a, b, 'pow'); }