TypeError: Cannot read property 'querySelectorAll' of null at script.js:4
---------------------------------------------------
lib/js/script.js \/
---------------------------------------------------
"use strict";
let container = document.querySelector(".input");
let btns = container.querySelectorAll("button");
let result = document.querySelector(".result .value");
console.log(btns);
for (let btn of btns) {
btn.onclick = function () {
alert("333");
result.textContent += result.textContent;
}
};
---------------------------------------------------
lib/js/script.js \/
---------------------------------------------------
"use strict";
let container = document.querySelector(".input");
let btns = container.querySelectorAll("button");
let result = document.querySelector(".result .value");
console.log(btns);
for (let btn of btns) {
btn.onclick = function () {
alert("333");
result.textContent += result.textContent;
}
};