π° DOM Manipulation
In this post we are going to look at:
Create Elements
Insert an elements
Modifying Contents
Replacing Elements
Remove Elements
Updating Element Attributes
DOM manipulation empowers developers to create dynamic and interactive web experiences.
For DOM manipulation, we use JavaScript to access, modify, or create these elements, making our web pages come alive without the need to reload them.
In this post we are going to look at:
Create Elements
Insert an elements
Modifying Contents
Replacing Elements
Remove Elements
Updating Element Attributes
DOM manipulation empowers developers to create dynamic and interactive web experiences.
Mastering methods like inserting, removing, replacing elements, updating attributes enables seamless user interactions.
β€1
CHALLENGE
function createCounter() {
let count = 0;
return {
increment: () => ++count,
decrement: () => --count,
get: () => count
};
}
const counter1 = createCounter();
const counter2 = createCounter();
counter1.increment();
counter1.increment();
counter2.increment();
console.log(counter1.get(), counter2.get());
const { increment, get } = counter1;
increment();
console.log(get());β€4
CHALLENGE
const promise1 = Promise.resolve('first');
const promise2 = new Promise(resolve => {
resolve('second');
});
const promise3 = Promise.resolve().then(() => 'third');
async function test() {
console.log('start');
const result1 = await promise1;
console.log(result1);
const result2 = await promise2;
console.log(result2);
const result3 = await promise3;
console.log(result3);
console.log('end');
}
test();π1
What is the output?
Anonymous Quiz
46%
start first end second third
28%
start end first second third
22%
start first second third end
4%
first second third start end
Build safer JS + WASM hybrids. Wrap WebAssembly calls inside JavaScript error boundaries for reliable, crash free execution.
β€2
β οΈ Course Alert π
π Java & Java with DSA Courses π
π Python & Python with DSA π
π΅ C++ & C++ with DSA π
π Web Development π
π€ Data Science & Machine Learning π
π Other Courses π
ο»Ώ
π DM us at @Myhurthearts to learn more! πβ¨ Don't miss out on this chance to invest in yourself! ππ Price is only 99
π Java & Java with DSA Courses π
π CORE JAVA: NareshIT | Kishan Sir
π₯ ADVANCED JAVA: Venkatesh Mansani
π₯οΈ SPRING BOOT: NareshIT | Kishan Sir
βοΈ JAVA DSA: DurgaSoft
β Sigma 5.0 Batch: Apna College
π CORE JAVA: Hari Krishna Sir | Naresh IT
π» JAVA FULL STACK COURSE
π Spring boot by Sanket singh
π Spring boot by Anuj bhaiya
π PW java with dsa course
π± Scaler java with dsa course
π coding wallah java
π² sherians jain java
π Smart Programming java
π Java with DSA by Ashok IT
π€‘ ALPHA 4.0 Java with dsa by apna college
π Python & Python with DSA π
π Adul Bari Python
π₯οΈ PYTHON FULL STACK: KV Rao 2024
βοΈ PYTHON DSA: DurgaSoft
π KRISH NAIK Python Course
π΅ C++ & C++ with DSA
π€‘ Naresh IT python full stack course
π PW PYTHON DSA COURSE
π Ineuron python course
π΅ C++ & C++ with DSA π
π‘ ALPHA DSA C++ by apna college
π PW C++ DSA
π₯ Love Babbar Supreme Batch
π DSA Abdul Bari
π€‘
π Web Development π
π¨ PW Skills Web Developmentπ Database & SQL π
β Delta 5.0 Batch: Apna College
π» DOT Batch: Love Babbar
π Namaste React
π Namaste JavaScript
βοΈ Namaste NodeJs
π Cohort 3.0: Web + DevOps
π§ Full Stack Web Development: Naresh IT & DurgaSoft
π Sanket Singh Full Stack Web Development
π NodeJS: Sanket Singh
π MERN Stack: Anuj Bhaiya
π₯οΈ PHP: Ram Sir
π¨ Frontend Development: IIT Madras
π Almabetter Full Stack Web Development Course
β‘ ASHOK IT Node JS
β UI Full Stack: Sudhakar Sharma | Naresh IT
π₯ Sherians Frontend Course
π€‘ Hitesh chaudhary web development course
π’ Ineuron full stack web development
π Mern stack sanket singh
π€‘ Backend by sanket singh
π± Web development 50+ Project
π MongoDB: Durga Sir
β Namaste SQL: Akshay Saini
π₯οΈ SQL: DurgaSoft & Naresh IT
π§ ORACLE
π€ Data Science & Machine Learning π
π PW Skills Data Science Courseπ οΈ DevOps & Azure π
π iNeuron Complete Data Science
π Data Science Master 2.0
π Data Science: IIT Madras
βοΈ MLOps Course: Naresh IT
π Code with harry data science
π’ Naresh IT data science
π€‘ Pw data analytics course
β‘ Full DevOps Course: Tech Nana
β Hey DevOps 5.0
π§ Ashok IT DevOps
π MS Azure DevOps Course
π Azure Data Engineering: Gareth | Naresh IT
βοΈ Azure Cloud Mastery
π DevOps with AWS
π Ineuron devops course
π Train with shubham devops course
π§ Git for DevOps: DurgaSoft
π€‘ Mithun technology devops course
π Other Courses π
βοΈ Google Cloud Platform: Mr. Saidulππ₯ Unlock Your Future with 200+ Popular Courses! π₯π
π ASP.NET: Bangar Raju | Naresh IT
π GATE CSE Prep: PW 1500
π± App Development: Harnoor Singh
π± Android Using Kotlin: DurgaSoft
βοΈ Selenium: Naresh IT
π€ Applied AI Full Course
π» C#: Bangar Raju
π Unix/Linux: Imran 2024 | Naresh IT
π Power BI Course
βοΈ Salesforce: Adnan | Naresh IT
π‘οΈ Cyber Security: iNeuron
π Digital Marketing: Ramakanth | Naresh IT
π Dhruv Rathee Management Course
πDhruv rathi Ai mastery course
π Dhruv rathi YouTube blueprint course
πUNACADEMY UPSC GS COURSE
π€‘ ADVANCE EXCEL & MIS COURSE
π Sanket singh Elite FAANG/MAANG course 900+ video
π Blender 3D full course
π TypeScript AshokIT(2020)
πDjango & Rest API NareshIT
πELK-JIRA-Jenkins course
DM @Myhurthearts for access to 200+ courses across Java, Python, Data Science, Web Development, and more. Donβt miss out on this amazing opportunity to learn and grow!
ο»Ώ
π DM us at @Myhurthearts to learn more! πβ¨ Don't miss out on this chance to invest in yourself! ππ Price is only 99
β€2
CHALLENGE
const promise1 = Promise.resolve('first');
const promise2 = new Promise(resolve => {
resolve('second');
});
const promise3 = Promise.resolve().then(() => 'third');
async function test() {
console.log('start');
const result1 = await promise1;
console.log(result1);
const result2 = await promise2;
console.log(result2);
const result3 = await promise3;
console.log(result3);
console.log('end');
}
test();β€1
What is the output?
Anonymous Quiz
39%
start first end second third
19%
start end first second third
31%
start first second third end
11%
first second third start end
π₯ π€ AI / DATA SCIENCE MASTER COURSE LIST (2026) π€π₯
π APPLIED AI FULL COURSE β AI Industry Experts | Professional AI ProgramStart your career in 2026 with Ai & Data science MSG for more info @Myhurthearts
π§ AI MASTERY COURSE β Dhruv Rathee | Independent Educator
πRohit Negi DSA & Generative Ai Course
π DATA SCIENCE MASTER 2.0 β PW Skills | PhysicsWallah
π COMPLETE DATA SCIENCE β iNeuron | iNeuron Learning
π DATA SCIENCE PROGRAM β IIT Madras | IIT Madras Online
π DATA SCIENCE COURSE β Code With Harry | YouTube / CWH
π₯οΈ DATA SCIENCE & ANALYTICS β Naresh IT Faculty | Naresh IT
π DATA ANALYTICS COURSE β PW Skills | PhysicsWallah
π€ MLOPS ENGINEERING COURSE β Naresh IT Experts | Naresh IT
π PYTHON FOR AI & ML β Krish Naik | YouTube / Corporate Trainer
π PYTHON PROGRAMMING β Abdul Bari | Udemy / YouTube
βοΈ PYTHON + DSA FOR AI β DurgaSoft Faculty | DurgaSoft
π» PYTHON FULL STACK (AI BASE) β KV Rao | Naresh IT
βοΈ AZURE DATA ENGINEERING β Gareth | Naresh IT
π©οΈ GOOGLE CLOUD PLATFORM (AI READY) β Mr. Saidul | GCP
CHALLENGE
const original = { a: 1, b: { c: 2 } };
const shallow = { ...original };
const deep = JSON.parse(JSON.stringify(original));
shallow.a = 10;
shallow.b.c = 20;
deep.a = 100;
deep.b.c = 200;
const frozen = Object.freeze({ x: 1, y: { z: 2 } });
frozen.x = 99;
frozen.y.z = 99;
console.log(original.a, original.b.c, frozen.x, frozen.y.z);β€1
The best way to learn JavaScript is by practicing examples. In this post, I have posted some basic programs for internships purpose and pratice.