Author: kavit

0

imperative vs declarative/functional programming

Imperative Programming : It specifies a series of instructions that the computer executes in sequence. For example, the following function uses imperative approach for finding the square of each element in the given array....

0

Default function parameters

The default function parameters in ES6, gives us the ability to initialize the function arguments with default values in case if they are undefined. For example, function mult(a, b) { b = typeof b...

0

Pure vs Impure functions

Characterestics of Pure Functions The return value of the pure functions solely depends on its arguments Hence, if you call the pure functions with the same set of arguments, you will always get the...

0

css : center element vertically and horizontally

CSS transform allows us to modify the coordinate space of any element. transform can have one of the following functions as its value : rotate skew scale matrix translate perspective Using the translate function...

0

css – circular profile pictures

Nowadays, circular profile pictures are very popular. It’s really simple to create the circular profile picture from a given square image using border-radius. Following example, renders an original square image as well as the...

0

css – vertically align text

Let’s see the example on horizontally aligning the text using text-align: center as shown in the below pen. [codepen_embed height=”345″ theme_id=”0″ slug_hash=”ONEPKQ” default_tab=”css,result” user=”kavitshah8″]See the Pen horizontally-aligned by Kavit Shah (@kavitshah8) on CodePen.[/codepen_embed] To...

0

querySelector vs getElementById

Get Element By Id It returns a node list which is live, meaning if you add or remove any element from the DOM the node list will update It is faster relative to the...

0

window vs document

Web browser is made up of hierarchy of objects. At the root level we have a window object. Window It is the root level element in any web page. All the global variables are...

Show Buttons
Hide Buttons