vituarvom / react-smart-utils

A simple, smart hooks and utility functions to make development easier
https://www.npmjs.com/package/react-smart-utils
13 stars 34 forks source link

Create shuffleArray Utility Function #58

Open bharat-dussa opened 1 month ago

bharat-dussa commented 1 month ago

shuffleArray

Shuffles the elements of an array randomly.

File: src/utils/array/shuffleArray/shuffleArray.ts Test File: src/utils/array/shuffleArray/shuffleArray.test.ts

Parameters:

Returns:

Example:

shuffleArray([1, 2, 3, 4]);  // Returns array with random order, e.g., [3, 1, 4, 2]
doosabhulaxmi commented 1 month ago

@bharat-dussa i want to solve this issue please assign