const generateHash = (l) => {
  let text = "";
  const char_list = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  for(let i=0; i < l; i++ ) {  
    text += char_list.charAt(Math.floor(Math.random() * char_list.length));
  }
  return text;
  console.log('li')
}
 
let hash = generateHash(20)

// SEe https://jdenticon.com
document.write(`<svg width="200" height="200" data-jdenticon-value="${hash}"></svg>`)

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdn.jsdelivr.net/npm/jdenticon@2.1.1