Using the BEM methodology in CSS with simple examples. Advantages & Reasons To Use

Working on an extensive development project with a lot of pages, a lot of CSS selectors, and different developers involved, makes the maintenance of the CSS styles difficult. Problems regarding CSS specificity often arise, and the altering of components in one area may affect components in another area, and so on. In order to deal …

 PHP | How To Perform Different Actions Based On Various Conditions

When we want to submit a form by clicking the Send button or show a warning message next to empty required fields, we use conditional statements. With the use of conditional statements, we can evaluate conditions and determine which code should be executed. We create conditional statements using the if, else, elseif, and switch keywords …

What is a Function in PHP? Definition and Easy Examples

A function is a block of code designed to repeatedly carry out a certain task. As a result of using functions, we have cleaner, easier to maintain, and more legible code. Let’s see an example: (click on the image to open in a new tab) This is an example of a function converting Celsius degrees …

What Does NaN (Not a Number) Represents in JavaScript?

The NaN value is one of the most misunderstood values in JavaScript. This is because the NaN type has some special behaviors that often create confusion. Let’s see if we can explain these behaviors in simple terms. In JavaScript, NaN is a property of the global object In simpler terms, it’s a variable that exists …

CSS 101-The Cascade and Specificity With Easy Examples

CSS, which stands for Cascading Style Sheets, handles the visual presentation of a webpage on a browser. Although a website can function without CSS, it won’t look pretty. Using CSS makes websites visually appealing and ensures a better user experience. CSS documents are considered style sheets because they define style. But why cascading style sheets? …