I am a beginner in JS so can’t resolve. Please help.
I can’t change the button background color.
Here’s the code ->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">`enter code here`
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JS Game</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<button class="btn1" onclick="change()"></button>
</body>
<script>
function change() {
document.getElementsByClassName('btn1').style.
backgroundColor="lightblue";
}
</script>
</html>