DulLabs / bhai-lang

A toy programming language written in Typescript
https://bhailang.js.org/
MIT License
3.97k stars 501 forks source link

Feature Request: exponentiation operator or text #270

Open PositiveUser opened 2 years ago

PositiveUser commented 2 years ago

Is your feature request related to a problem? Please describe.

I have not found a way to do exponentiation in your language

Describe the solution you'd like.

Exponentiation is a mathematical operation.


In Mathematics

ab

Examples

35 = 3 × 3 × 3 × 3 × 3 53 = 5 × 5 × 5


My solutions for Bhailang ↓


As an operator

a ** b

Examples

3 ** 5 = 3 * 3 * 3 * 3 * 3 5 ** 3 = 5 * 5 * 5


As text

a ka ghat b (this is in Hindi language)

Examples

3 ka ghat 5 = 3 * 3 * 3 * 3 * 3 5 ka ghat 3 = 5 * 5 * 5


Thank you very much

Describe alternatives you've considered

No response

Additional context.

No response