File tree Expand file tree Collapse file tree 2 files changed +30
-17
lines changed Expand file tree Collapse file tree 2 files changed +30
-17
lines changed Original file line number Diff line number Diff line change 961
961
" spaces"
962
962
],
963
963
"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"
964
981
}
965
982
]
966
983
},
1645
1662
" promises"
1646
1663
],
1647
1664
"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"
1665
1665
}
1666
1666
]
1667
1667
},
Original file line number Diff line number Diff line change 274
274
],
275
275
"tags" : [" string" , " tabs" , " spaces" ],
276
276
"author" : " axorax"
277
+ },
278
+ {
279
+ "title" : " Random string" ,
280
+ "description" : " Generates a random string of characters of a certain length" ,
281
+ "code" : [
282
+ " function makeid(length, characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') {" ,
283
+ " return Array.from({ length }, () => characters.charAt(Math.floor(Math.random() * characters.length))).join('');" ,
284
+ " }" ,
285
+ " " ,
286
+ " console.log(makeid(5, \" 1234\" /* (optional) */));"
287
+ ],
288
+ "tags" : [" javascript" , " function" , " random" ],
289
+ "author" : " kruimol"
277
290
}
278
291
]
279
292
},
You can’t perform that action at this time.
0 commit comments