Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Rushi Javiya
Page 9 of 14
How to check if the input date is equal to today's date or not using JavaScript?
We learn to check if the input date is equal to today's date or not using JavaScript in this tutorial. Sometimes, we need to take the date from users in the input field in various formats and check if input date and today's date match. Here, we will learn two approaches to check the equality of the input date with today's date. Method 1: Comparing Year, Month, and Date Separately Users can get the full year, month, and date from the timestamp of the Date object using various methods such as getFullYear(), getMonth(), and getDate(). Also, we ...
Read MoreDifference between Google Script (.GS) and JavaScript (.js)
What is a .GS file? A .GS file contains Google Apps Script code, which is JavaScript-based code designed to automate tasks across Google's suite of applications. These scripts run in Google's cloud environment and can interact with Google Sheets, Docs, Gmail, Drive, and other Google services to create powerful automation workflows. Google Apps Script files are stored on Google's servers and executed in a server-side environment. They enable developers to build web applications, automate repetitive tasks, and integrate Google services with external APIs. Common use cases include sending personalized emails, generating reports from spreadsheet data, and creating custom user ...
Read MoreHow to clone an array in ES6?
In ES6, the spread operator (...) provides the most elegant way to clone arrays. While ES5 used methods like concat() and slice(), ES6 offers a cleaner syntax for array cloning. The Problem with Assignment Operator Using the assignment operator creates a reference, not a copy. This means changes to one array affect the other: Problem with Assignment Operator let output = document.getElementById('output1'); let array1 = ["Hi", "users", "Welcome"]; ...
Read MoreTop Reasons to Learn JavaScript
Learning a new programming language is an additional advantage to a developer. Before learning JavaScript, developers should get a basic idea of HTML and CSS. You will be wondering why it is essential to learn JavaScript. Other programming languages are also available in Information Technology. Of course, all programming languages are necessary for a developer. But JavaScript is the foundation for all. Knowing HTML, CSS and JavaScript make you an adaptable developer. Popular and Widely Used Both front-end developers and back-end developers use JavaScript. Among 1.8 billion websites in the world, 95% of the websites use JavaScript. ...
Read MoreHow to close a current tab in a browser window using JavaScript?
We will learn to close the browser window using JavaScript in this tutorial. Suppose users have opened your website in 2 tabs and don't want to allow it, then you can close one tab automatically using JavaScript. Also, if you have noticed that some web apps automatically open the browser window to capture a face, it closes automatically when you capture the image by clicking the button. It's all we can do using JavaScript. This tutorial will teach different examples of closing the current tab in a browser window using JavaScript. Note − JavaScript never allows developers ...
Read MoreHow to combine multiple elements and append the result into a div using JavaScript?
Sometimes, we require to manipulate the HTML elements using JavaScript. So, we can use JavaScript to add or remove HTML elements. This tutorial will teach us to combine multiple HTML elements in a single shot using JavaScript. Sometimes we need to show some HTML elements to users when they click the button or particular event triggers. So, we can use the approaches below to combine multiple elements and append the result into a div element using JavaScript. Use the innerHTML Property The innerHTML, as the name suggests, allows us to set the HTML for any particular element ...
Read MoreTop JavaScript Best Practices and Standards to Know
JavaScript is a powerful programming language widely used for building web applications. Following established best practices ensures your code is maintainable, readable, and performs efficiently. This guide covers essential JavaScript standards every developer should know. Code Organization and Naming Use clear, descriptive names that explain what variables and functions do. Good naming makes code self-documenting and easier to maintain. // Bad naming let d = new Date(); let u = users.filter(x => x.a > 18); // Good naming let currentDate = new Date(); let activeUsers = users.filter(user => user.age > 18); ...
Read MoreSorting Function in SASS
In this article, we will learn about the sorting function in Sass, but before moving forward, let's have a basic idea about Sass; so sass is a powerful and popular preprocessor language for CSS that allows developers to write more efficient and maintainable stylesheets. One of the best advantages of Sass is the ability to use functions to streamline the development process. However, one function that Sass does not provide out of the box is a sorting function. Sorting is a common task in all programming languages and can be useful in many different contexts when working with stylesheets. ...
Read MoreNeumorphismUI Form
NeumorphismUI is a design trend that combines skeuomorphism with modern aesthetics, creating elements that appear to extrude from the background. When applied to forms, it creates a tactile, interactive feeling that enhances user experience and makes interfaces more engaging. Syntax The key to neumorphism is using dual box-shadows to create the illusion of depth − .neumorphic-element { box-shadow: -5px -5px 10px #ffffff, 5px 5px 10px #b7b7b7; /* OR for inset effect */ box-shadow: inset -5px -5px 10px #ffffff, inset 5px 5px 10px #b7b7b7; } ...
Read MoreLast-child and last-of-type selector in SASS
SASS provides advanced selectors that extend CSS functionality, including :last-child and :last-of-type pseudo-selectors. These selectors help target specific elements based on their position within parent containers. Last-child Selector in SASS The :last-child selector targets the last child element within a parent container, regardless of the element type. It applies styles to the final element and all its nested children. Syntax .parent-element :last-child { /* CSS properties */ } Example 1: Basic Last-child Selection This example demonstrates selecting the last child element within a container − ...
Read More