What is Hackers' Pub?
Hackers' Pub is a place for software engineers to share their knowledge and experience with each other. It's also an ActivityPub-enabled social network, so you can follow your favorite hackers in the fediverse and get their latest posts in your feed.



![const rotatearray = (array, direction = 1) => {
return direction > 0 ?
array.push(array.shift()) :
array.unshift(array.pop());
};
// rotatearray([1,2,3]) => [2,3,1]
// rotatearray([1,2,3], 1) => [2,3,1]
// rotatearray([1,2,3], -1) => [3,1,2]](https://assets.toot.cafe/media_attachments/files/115/575/352/910/833/962/original/8ea8e33fb82d967a.png)















DevelopersIO 






