Make random word use the dictionary instead of auxiliar array. #22

Closed
opened 2022-06-11 16:26:26 +09:00 by Ghost · 3 comments

Also if posible make it search a heonian word, i think that whould be feature not refactor. But i prefer comenting here than makign another issue

Also if posible make it search a heonian word, i think that whould be feature not refactor. But i prefer comenting here than makign another issue
Ghost added the
refactoring
label 2022-06-11 16:26:26 +09:00
lustlion added the
enhancement
label 2022-06-11 16:33:47 +09:00
Owner

Please use these

function randint(bound) {
    return Math.floor(Math.random() * bound);
}

function randitem(array) {
    return array[randint(array.length)];
}
Please use these ``` function randint(bound) { return Math.floor(Math.random() * bound); } function randitem(array) { return array[randint(array.length)]; } ```
Author

We surelly need one of those but need the second one to be changed to a dictionary instead of the array to fulfill the issue i posted :P

Please use these

function randint(bound) {
    return Math.floor(Math.random() * bound);
}

function randitem(array) {
    return array[randint(array.length)];
}
We surelly need one of those but need the second one to be changed to a dictionary instead of the array to fulfill the issue i posted :P > Please use these > > ``` > function randint(bound) { > return Math.floor(Math.random() * bound); > } > > function randitem(array) { > return array[randint(array.length)]; > } > ```
remi closed this issue 2022-06-12 06:01:07 +09:00

doen in 0e8ac06e26 . i htink

doen in 0e8ac06e26 . i htink
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: heonian.org/heonian-webdic#22
No description provided.