index vs charAt vs startsWith & endsWith vs slice vs regex test| Test case name | Result |
|---|---|
| index | |
| charAt | |
| startsWith & endsWith | |
| slice | |
| regex test |
| Test name | Executions per second |
|---|---|
| ✓ charAt | 2,456,048 Ops/sec |
| slice | 2,438,018 Ops/sec |
| index | 2,433,405 Ops/sec |
| startsWith & endsWith | 2,356,459 Ops/sec |
| regex test | 50,709 Ops/sec |