Skip to content

Instantly share code, notes, and snippets.

View kafaa-dev's full-sized avatar

Kafaa Billahi Syahida kafaa-dev

View GitHub Profile
@kafaa-dev
kafaa-dev / example.js
Last active January 8, 2023 06:24
Generate Random String (JavaScript)
const numbers = '0123456789';
const specials = '`-=[]\\;\',./~!@#$%^&*()_+{}|:"<>?';
const charsLower = 'abcdefghijklmnopqrstuvwxyz';
const charsUpper = charsLower.toUpperCase();
const alphabet = charsLower + charsUpper;
const alphaNumeric = numbers + alphabet;
const all = alphaNumeric + specials;
const random = {
numbers,