Skip to content

Commit

Permalink
fix typo in randomInt error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaobin-Jiang committed Mar 1, 2024
1 parent 72ddfa0 commit 7845f00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jspsych/src/modules/randomization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export function randomID(length = 32) {
*/
export function randomInt(lower: number, upper: number) {
if (upper < lower) {
throw new Error("Upper boundary must be less than or equal to lower boundary");
throw new Error("Upper boundary must be greater than or equal to lower boundary");
}
return lower + Math.floor(Math.random() * (upper - lower + 1));
}
Expand Down

0 comments on commit 7845f00

Please sign in to comment.