How to find all the indices of words in a string that are surrounded by double asteride in javascript using regex

I want to get this one.

const str = 'Get **words words** from a sentence that contains **words**, how?'
console.log(findIndices(str))

This should return this.

[[6, 16], [53, 57]]  // the start index and end index of words surrounded by double asterides.

How can I define the javascript function findIndices()?