JSFiddle - React, Tailwind, and code Playground

by Mladen Petrovic

JavaScript

let pages = []

for(let i = 0; i < 100; i++) {
	pages.push(i)
}

const currentPage = 4

const pagination = pages.map(p => {
	let aroundPage = currentPage + 3
	if (p === aroundPage) {
  	return p	
  }
})