1. Difference between == and ===

== and === are comparison operator. Comparison operators are used to compare values and return a boolean value. There’s a huge difference between == and ===.

== compares only values and doesn’t bother about data type. If the value matches it returns true else it returns false. For example if we compare string ‘25’ with integer 25 using == operator it will return true ignoring their data type.

On the other hand, === compares both value and data type. If they both matches only then it will return true else it will return false. For example, if we again compare…


1. Component

A component is a chunk of code or a part of website that is reusable and stateful. Component can be small or big it doesn’t matter. In React we describe data using components. We can manage different data in similar component by passing data through props.

2. JSX

JSX stands for Javascript XML. It allows us to write HTML code inside our React code. This way we don’t have to do DOM manipulation manually. We can store HTML in variable normally like storing any other value. For example:

const element = <h1>This is a JSX element,/h1>;ReactDOM.render(element, document.getElementById('root'));

3. Create function component

Creating function component is…


1. Var

var is globally scoped. When var is declared outside of a function it becomes a global variable. var can be re-declared / updated. Problem with var is that if we use a variable outside of a function and then try to define a new variable with the same name in a scope it will update outside global variables value rather than creating a new variable.

var name = "Hotaro Oreki";
var roll = 10;
if(roll === 10){
var name = "Parves Hossain Rabby";
};
console.log(name); // Parves Hossain Rabby

2. Let, Const (ES6)

let and const are block scoped variable. They doesn’t interfere with…


1. Slice

String slice() method returns a part of string without modifying the original string. Slice method takes minimum one argument and maximum two argument.

string.slice(Start Index, End Index)

Returned string will be created between start index to end index. If end index is not defined it will return a string between start index to last index of the string. (Negative index works from backwords)

Parves Hossain Rabby

Hello, I am a Full Stack web developer. I am a hardworking, enthusiastic learner and I am always looking for opportunities to learn new technologies.

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