React is the most popular front end library. Knowing most commonly used array methods makes the development process easier. map() -function returns the new array where it takes a function that will be triggered on each element of the provided array. function takes first argument as each element of an given array. The second argument […]
Include Sass to React Application
You can style your application using plain CSS but Sass has much better features like variables, mixins, nesting and much more which makes is easy to write CSS. Let’s start with installing it to your react project. In your command line, go to your project directory and execute the below mentioned command. Restart your application […]
7 Most commonly used Number Methods in JavaScript
Number(value) – Returns the number from the provided value as an argument. If a boolean value is provided it will show 1 for true and 0 for false. But for a string with alphanumeric characters, it will return as NaN toString() – Returns the string for the provided number. Number.IsNaN() – Returns boolean value. If […]
10 Most Important String Methods
charAt(i) – this method returns the character at the provided index of i for a string. The index starts from left at 0. length – Method returns the length of the provided string. split(delimiter,limit) -it returns an array containing each element according to the specified delimiter. limit is an optional parameter which will specify the […]
What is Hoisting in JavaScript?
Hoisting is JavaScript’s default behavior to push declarations of variables to the top of its scope. When JavaScript compiles the code, all the variables declarations are moved to the top of their global or functional scope. Hoisting does not happen inside your code but it happens when JavaScript compiles your code. Even the functions are […]
Difference between Var, Let and Const
When ES2016 was introduced, it had two new ways of defining variables called let and const. Earlier, in JavaScript you could only define variables using var. Var var is function-scoped or globally scoped. var which is declared outside of the function-scope is available to use by the entire web page. Function-scope means when declared inside […]
A Guide To Operators In JavaScript
An operator performs operation on one or multiple values and build result. There are 5 categories of operators. Comparison Operators Arithmetic Operators Assignment Operators Conditional Operators Logical Operators Comparison Operators This list of operators always requires two operands and returns a boolean value as the result. Operators Description == equal to === matches value and […]
Important Data Types in JavaScript
Data type means the type of data which can be stored and used in a program. There are 6 data types in JavaScript. There are mainly three categories which data types can be divided into: Primitive Data Types – This includes string, number and boolean. It holds only one value at a time. Reference Data […]
Top 5 commonly used git commands
Git CloneGit Clone is a command for fetching source code from a remote repository. It makes an identical copy of the latest version of a project in your local repository. The command is: git clone <url> //url : Get the URL from the project which usually starts with https:// in the above image, we are […]