При запуске скриптов, выдает ошибку.
let item = document.getElementsByClassName("menu-item");
menu = document.getElementsByClassName("menu");
adv = docoment.getElementsByClassName("adv");
col = document.getElementsByClassName("column");
document.col.removeChild("adv");
menu.document.replaceChild(item[1], item[2]);
prompt('gfjfhehd');
данный код не работает, даже банальный алерт не работает, выдает следующее:
[Running] node "d:\OpenServer\domains\hometask5\js\tempCodeRunnerFile.js"
d:\OpenServer\domains\hometask5\js\tempCodeRunnerFile.js:1
var item = getElementsByClassName("menu-item");
^
ReferenceError: getElementsByClassName is not defined
at Object.<anonymous> (d:\OpenServer\domains\hometask5\js\tempCodeRunnerFile.js:1:12)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47
[Done] exited with code=1 in 0.095 seconds
[Running] node "d:\OpenServer\domains\hometask5\js\tempCodeRunnerFile.js"
d:\OpenServer\domains\hometask5\js\tempCodeRunnerFile.js:1
prompt('gfjfhehd');
^
ReferenceError: prompt is not defined
at Object.<anonymous> (d:\OpenServer\domains\hometask5\js\tempCodeRunnerFile.js:1:1)
at Module._compile (internal/modules/cjs/loader.js:1072:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47
[Done] exited with code=1 in 0.092 seconds