Sign in

1. slice() :

The JavaScript string slice() method is used to fetch the part of the string and returns the new string. It required to specify the index number as the start and end parameters to fetch the part of the string. The index starts from 0. This method allows us to pass a negative number as an index. In such a case, the method starts fetching from the end of the string. It doesn’t make any change in the original string.

subString() similar to the slice() method but the difference is it can not accept a negative index

This is also similar…

this keyword is a familiar keyword who knows javascript. In this article, we will learn about what is this keyword in JavaScript, four different binding of “this” keyword, and about new keyword. In other words, every javascript function while executing has a reference to its current execution context, called this. Execution context means here is how the function is called.

The bind method creates a new function and sets the this keyword to the specified object.

The call method sets the this inside the function and immediately executes that function.

The difference between call() and bind() is that the call()

The Virtual DOM is programming concept. The real thing’s power to directly change what’s on the screen.

Manipulating the DOM is slow. Manipulating the virtual DOM is much faster, because nothing gets drawn onscreen

a. The entire virtual DOM gets updated.

b. The virtual DOM gets compared to what it looked like before you updated it. React figures out which objects have changed.

c. The changed objects, and the changed objects only, get updated on the real DOM.

d. Changes on the real DOM cause the screen to change.

JSX allows us to write HTML elements in JavaScript and place…

shortly describe about es6 block binding

1. Var Declarations and Hoisting

Variable declarations using var are treated as if they are at the top of the function this is called hoisting. For a exapmle of what hoisting does, consider the following function :

function myFun(condition) {    if (condition) {
var value = 123;
return value;
} else {
// statement
// value exists here with a value of undefined

2. Block-Level Declarations

Block-level declarations are those that declare variables that are inaccessible outside of a given block scope. Block scopes are created:

  1. Inside of a function
  2. Inside of a block (indicated by the { and } characters)

The introduction of block-level declarations…


I am Naiemul Islam. I am a professional web Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store