Arpan Mukherjeearpanmukherjee.hashnode.dev·Jul 14, 2023Day 52 of #100daysofjsPromises are a crucial concept in JavaScript that allow you to handle asynchronous operations in a more organized and manageable way. They were introduced as a native feature in ECMAScript 2015 (ES6) and have since become a fundamental part of JavaSc...arpanmukherjeeblog
Arpan Mukherjeearpanmukherjee.hashnode.dev·Jul 9, 2023Day 47 of #100daysofjsQuestion 1 Write a program to show different alerts when different buttons are clicked Answer <!DOCTYPE html> <html> <head> <title>Alert Demo</title> </head> <body> <button onclick="alert('Button 1 clicked')">Button 1</button> <button onc...arpanmukherjeeblog
Arpan Mukherjeearpanmukherjee.hashnode.dev·Jul 8, 2023Day 46 of #100daysofjsIn this lesson, we'll discuss addEventListener() and removeEventListener(), which are used to assign and remove event handlers, respectively. Consider the following HTML code: <!DOCTYPE html><html><head> <title>Lesson 48</title></head><body> <d...49 readsarpanmukherjeeblog
Arpan Mukherjeearpanmukherjee.hashnode.dev·Jul 7, 2023Day 45 of 100daysofjsAn event is a signal that something has happened in a web page, such as a user clicking a button or submitting a form. In this lesson, we'll learn about some of the most common types of events and how to handle them in JavaScript. Consider the follow...arpanmukherjeeblog
Arpan Mukherjeearpanmukherjee.hashnode.dev·Jul 6, 2023Day 44 of #100daysofjsIn JavaScript, there are two functions that are commonly used to control the timing of events: setInterval and setTimeout. Both of these functions can be used to delay the execution of a piece of code or to repeat a piece of code at a regular interva...45 readsarpanmukherjeeblog
Arpan Mukherjeearpanmukherjee.hashnode.dev·Jul 5, 2023Day 43 of #100daysofjsChanging HTML Classes using JavaScript: className and classList In HTML, we can use classes to group elements and apply the same styles to them using CSS. In JavaScript, we can manipulate classes to change the appearance or behavior of elements dynam...42 readsarpanmukherjeeblog
Arpan Mukherjeearpanmukherjee.hashnode.dev·Jul 4, 2023Day 42 of #100daysofjsinsertAdjacentHTML, insertAdjacentElement and insertAdjacentText insertAdjacentHTML The insertAdjacentHTML method inserts a string of text as HTML into a specified position relative to the element. The following code shows how to use the insertAdjace...40 readsarpanmukherjeeblog
Arpan Mukherjeearpanmukherjee.hashnode.dev·Jul 3, 2023Day 41 of #100daysofjsHTML Insertion Methods In HTML, there are several ways to insert new content or modify existing content dynamically using JavaScript. These are known as HTML insertion methods. Consider the following HTML: <!DOCTYPE html> <html> <head> <title>Less...31 readsarpanmukherjeeblog
Arpan Mukherjeearpanmukherjee.hashnode.dev·Jul 2, 2023Day 40 of #100daysofjsHTML Attributes and their Methods In this lesson, we will be learning about HTML attributes and their methods. HTML attributes provide additional information about HTML elements, and they can be accessed and manipulated using JavaScript. Consider the...39 readsarpanmukherjeeblog
Arpan Mukherjeearpanmukherjee.hashnode.dev·Jul 1, 2023Day 39 of #100daysofjsconsole.dir() console.dir() is a method that is used to display an interactive list of the properties of a specified JavaScript object. When we use console.dir() on a DOM element, it shows us all the properties and methods available for that element....40 readsarpanmukherjeeblog