-
Remove Bullet Points and Underline – CSS
You can easily remove bullets from unordered or ordered lists and underlines from anchor tags in HTML using certain CSS rules. Example Let’s see how to achieve this with an example : In the above code snippet, we’ve three links inside of anchor tags. By default you’ll have underlines beneath them and bullet points before…
-
Smallest Integer in an Array – JavaScript
To find the smallest integer in an array, we can use various methods. Firstly, let’s use the Math.min() method: Using reduce() method: Let’s break down Example 2 now using some visuals for you to understand: Other ways to do this:
-
What is a Descendant Combinator in CSS?
Descendant combinator is a parent-and-child selector in CSS. In this, a child element will be selected only when there’s a parent element present. Another way to put it is that it will select a child element only if it’s nested inside a parent (or ancestor) element, no matter how deep down the nested element is.…
-
Grouping Selectors vs Chaining Selectors in CSS
Grouping Selectors Say there are two groups of HTML elements which should have the same CSS style declarations added to them, for example the same background-color and text-color. In order to cut things short, we use grouping selectors to avoid repetitions. Let’s take a simple example with and without grouping: : Though the both codes…
-
What is the exact order of precedence in CSS?
In CSS, the rule of precedence is actually very simple and straight forward. Those CSS codes which are more specific to a certain situation takes precedence over the less specific code declarations. Now as a general rule of thumb, this is the exact order of precedence (1 the most,6 the least): In short, this is…
-
How to fix HTML Image Tag not working?
I’ve assumed that you didn’t make any typo errors while using the image source. I’m also assuming that you’ve properly linked to the image source whether it’s from the internet or a specific folder. This hack pertains to the images not loading from a directory where you have kept the images. So, the cheat is…
-
Sum of elements in an array in JavaScript
This is how the sum of elements in an array should look like: We can use the reduce() method to find the sum of elements in an array : Here, the reduce() method actually takes two parameters, the first one we can call accumulator, and the second one, current. So, here in the above example,…
-
Factorial of a given number in JavaScript
Factorial of an integer ‘n’ is represented by ‘n!’. Factorial of an integer n is the product of all positive integers less than or equal to n. Examples : Here’s a way to find the factorial of a given number: Here the variable factInt is initialized at 1 since the function will always be greater…
-
Square of every digit of a given number – JavaScript
Example 1 In order to square every digit of a number in JavaScript, we can use the following function: Explanation and break-down In order to know what is happening within this function we have to break it down. So, in the first step we split the digits of the number to a string of individual…
-
Linux Terminal Commands For Absolute Beginners
This document is extremely important to at least get started with Linux terminal commands . To open the Linux Terminal, press Ctrl+Alt+T. Here are the most important ones to start with : Examples of cd in action: Just type ‘cd’ or ‘cd ~’ to return back to the home directory if you are inside some…