qr codes are everywhere nowadays! you scan them for websites or payments. most devs use online tools but why not make one yourself? it's surprisingly simple.
first, grab this snippet:
[code]function generateqrcode(data) {
const url = `
data
)}`;
return `<img src="${url}" alt="qr code">`;
}
console. log(generateqrcode('
just plug in the link or text you want, and voilà! now go ahead & customize it for your project. anyone up to share their own qr code hacks?
ps: use other apis if this one doesn't suit ya
article:
https://www.freecodecamp.org/news/how-to-build-a-qr-code-generator-using-javascript/