Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/techeverri/pow
Iterative and recursive implementation of the exponentiation function using TypeScript
https://github.com/techeverri/pow
interview jest typescript
Last synced: 21 days ago
JSON representation
Iterative and recursive implementation of the exponentiation function using TypeScript
- Host: GitHub
- URL: https://github.com/techeverri/pow
- Owner: techeverri
- License: mit
- Created: 2020-10-14T21:58:07.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-25T05:23:08.000Z (about 1 month ago)
- Last Synced: 2024-11-25T05:25:22.536Z (about 1 month ago)
- Topics: interview, jest, typescript
- Language: TypeScript
- Homepage:
- Size: 476 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Continuous Integration](https://github.com/techeverri/pow/actions/workflows/main.yml/badge.svg)](https://github.com/techeverri/pow/actions/workflows/main.yml)
# Task
The task is to implement the `pow()` function (aka [exponentiation](https://en.wikipedia.org/wiki/Exponentiation))
## Requirements
- The `pow()` function should return `base` to the `exponent` power
- You are not allowed to use the built in [`Math.pow()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow) or the [exponentiation operator (\*\*)](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Exponentiation).
- The `pow()` function should be properly documented using [JSDoc](https://jsdoc.app/) syntax
- Add a few unit tests for testing the `pow()` function## Testing
- Clone the project
- Install the dependencies `npm install`
- Run `npm test`