|
let cp = currentPage; |
|
|
|
let begin = cp < half ? 0 : cp - half; |
|
let end = cp < half ? perPage : cp + (half - 1); |
IMO copying currentPage into cp reduces readability. could we not simply use currentPage where we are using cp?
This issue prompted by this discussion.