How to create an hourglass star pattern in JavaScript

How to create an hourglass star pattern in JavaScript