File tree Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Original file line number Diff line number Diff line change 961961 " spaces"
962962 ],
963963 "author" : " axorax"
964+ },
965+ {
966+ "title" : " Random string" ,
967+ "description" : " Generates a random string of characters of a certain length" ,
968+ "code" : [
969+ " function makeid(length, characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') {" ,
970+ " return Array.from({ length }, () => characters.charAt(Math.floor(Math.random() * characters.length))).join('');" ,
971+ " }" ,
972+ " " ,
973+ " console.log(makeid(5, \" 1234\" /* (optional) */));"
974+ ],
975+ "tags" : [
976+ " javascript" ,
977+ " function" ,
978+ " random"
979+ ],
980+ "author" : " kruimol"
964981 }
965982 ]
966983 },
16451662 " promises"
16461663 ],
16471664 "author" : " 0xHouss"
1648- },
1649- {
1650- "title" : " Random string" ,
1651- "description" : " Generates a random string of characters of a certain length" ,
1652- "code" : [
1653- " function makeid(length, characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') {" ,
1654- " return Array.from({ length }, () => characters.charAt(Math.floor(Math.random() * characters.length))).join('');" ,
1655- " }" ,
1656- " " ,
1657- " console.log(makeid(5), \" 1234\" /* (optional) */);"
1658- ],
1659- "tags" : [
1660- " javascript" ,
1661- " function" ,
1662- " random"
1663- ],
1664- "author" : " kruimol"
16651665 }
16661666 ]
16671667 },
You can’t perform that action at this time.
0 commit comments