cardValuefunction
A card's worth in the count: ace one, court cards ten.
Import it
import { cardValue } from "@johnmorrisdotca/toranpu/cribbage";
Definition
function cardValue(card: CardId): number
Parameters
| Name | Type | Description |
|---|---|---|
card | string | The physical card or card id to read, draw or play. |
Returns
number
A card's worth in the count: ace one, court cards ten.
Examples
import { cardValue } from "@johnmorrisdotca/toranpu/cribbage";
console.log(cardValue("JS"));10What it prints (run when this page was built)