function shuffle(array) {
	  var counter = array.length;
	  var temp = 0;
	  var index = 0; // While there are elements in the array

	  while (counter > 0) {
	    // Pick a random index
	    index = Math.random() * counter | 0; // Decrease counter by 1

	    counter--; // And swap the last element with it

	    temp = array[counter];
	    array[counter] = array[index];
	    array[index] = temp;
	  }
	}
Shuffles the array in-place using Fisher-Yates algorithm.

```js
const a = [1, 2, 3, 4, 5];
tf.util.shuffle(a);
console.log(a);
```

@param array The array to shuffle in-place.

@doc {heading: 'Util', namespace: 'util'}