const model = [
{type: 'title', value: 'helloy world from js'},
{type: 'text', value: 'here we go wi'},
{type: 'columns', value: [
'11111111',
'22222222',
'333333333',
]}
]
const $site = document.querySelector( '#sete' );
model.forEach(block => {
let html = ''
if (block.type === 'title') {
html =`
<div class="row">
<div class="col-sm">
<h1>${block.value}</h1>
</div>
</div>
`
}else if (block.type === 'text') {
html = `
<div class="row">
<div class="col-sm">
<p>$(block.value)</p>
</div>
</div>
`
}else if (block.type === 'columns') {
}
$site.insertAdjacentHTML('beforebegin', html);
})
Ошибка такая;
index.js:35 Uncaught TypeError: Cannot read properties of null (reading 'insertAdjacentHTML')
at index.js
at Array.forEach (<anonymous>)
at