JSFiddle - React, Tailwind, and code Playground

by frogggeee McFrogggeee

HTML

<!DOCTYPE html><html><head><body><h1>very strong password generator</h1><button type="button" onclick="generate()">generate password</button><script>let password = "";let which = 0;let pl = Math.floor(Math.random() * 10) + 5;let low = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "!", "@", "#", "$", "%", "&", "*", "?"];function generate() {  let sim = 0;  password = "";  pl = Math.floor(Math.random() * 10) + 5;  let i = 0;  for (i = 0;i < pl;i++) {	  which = Math.floor(Math.random() * 70);    sim = low[which];    password = password + sim;  }  alert (password);}</script></body></head></html>