mirror of
https://github.com/remvze/moodist.git
synced 2026-03-11 22:54:42 +08:00
10 lines
205 B
TypeScript
10 lines
205 B
TypeScript
export function generateRandomBinaryString(length: number) {
|
|
let binaryString = '';
|
|
|
|
for (let i = 0; i < length; i++) {
|
|
binaryString += Math.floor(Math.random() * 2);
|
|
}
|
|
|
|
return binaryString;
|
|
}
|