DOM methods part 2
What is createElement()? It is used to create a new HTML element using...
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3734090) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Nanthini Ammu Posted on Apr 28 DOM methods part 2 #webdev #javascript #beginners #tutorial What is createElement()? It is used to create a new HTML element using JavaScript. Creating an element is a multi-step workflow because the element is added in JavaScript memory, not on the screen. It consist of 3 step.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV Community.