unable to select second button using queryselectorall(). giving me an error "Uncaught TypeError: btn.addEventListener is not a function"
//HTML//
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<button class="btn">A</button>
<button class="btn">B</button>
</body>
<script src="app.js"></script>
</html>
//Javascript//
const btn = document.querySelectorAll(".btn");
btn.addEventListener('click' ,myfunction);
function myfunction(){
console.log('hello');
}