One of the most used concepts in coding interviews, hash table. Many modern programming languages have built-in hash tables, which makes it very simple to use; for example in Python, its Python dictionary, and in JavaScript, it’s JavaScript object.

Image for post
Image for post
Photo by Tom Fisk from Pexels

What is a hash table?

A hash table is a data structure that allows us to store pairs of keys, and values, where every key maps to a value. In a hash table, you can access a value given a key. These are very powerful and common data structure, it is used often in practice and in coding interviews.


PropTyping allows us to bring type checking to props, so this is the data passed down from the parent component to the child component. This makes debugging our react application much easier. For the purpose of this article, I will a simple book application as an example.

Image for post
Image for post
by Markus Spiske

How does it work?

To get started, create a simple react app and install the proptypes package, npm install --save prop-types. Now if you check the package.json file you should have an entry of prop types. Next, import proptypes into our component file.

import React, { Component } from 'react';
import PropTypes from "prop-types"
class BookDetail extends React.Component {
render() {
return (
<h1>{this.props.book}</h1> …


The Math object in JavaScript provides multiple useful methods to perform mathematical operations. Going through some of the Math objects you might think, how it differs from the Number methods. Well, the Math object allows us to work with more advanced calculations, such as finding absolute value, rounded numbers, random numbers, pi, maximum, and minimum integers, etc.

Image for post
Image for post
By John Moses Bauan

Use of Math Objects

  1. Math.abs()

The Math.abs(x) method returns the absolute value of the given element xor an operation.

let x = -12Math.abs(x)              //Output: 12let x = 2 - 4Math.abs(x)              //Output: 2

2. Math.random()


There are many JavaScript Number methods that are often used to manipulate number values. These number formats support integers, floating-point numbers, such as decimal, hexadecimal, notations.

Image for post
Image for post
Alex Chambers

JavaScript Number Format

1. Number()

The Number() method converts a string into a number.

// Example 1
let x = '10'
let num = Number(x)
console.log(num) // Output: 10
console.log(num * 9) // Output: 90
// Example 2
let x = true
let num = Number(x)
console.log(num) // Output: 1
console.log(num + 9) // Output: 10
//Example 3
let x = false
let num =…


One thing common about every programmer, be it senior, junior, or entry-level we often look up syntaxes and methods while coding but it is not possible during an interview. Although many interviewers help or give hints if you get stuck, it is a good practice to have some of the methods memorized.

Image for post
Image for post
by Florian Müller
  1. push() method is used to add items at the end of an array.
const books = ['Cracking the Coding Interview', 'C++ Without Fear'];books.push('JavaScript');books;#Output: ['Cracking the Coding Interview', 'C++ Without Fear', 'JavaScript']

2. unshift() add values at beginning of the array.

books.unshift('');books;#Output: ['Cracking the Coding Interview', 'C++ Without Fear'…

HackerRank’s Arrays Left Rotation

Input: n = 7, d = 2
arr[] = {1, 2, 3, 4, 5, 6, 7}
Output: 3 4 5 6 7 1 2
Explanation: Rotation of the above
array by 2 will make the output array . …

Making your projects live is probably the best way to demo your work to the recruiters. Initially, we all start by running our projects on the localhost, which works just fine. Yet, when it comes to demoing the project to the recruiters, it is more convenient to have a live site. It will allow you to access your project site on any computer, at any time and/or place as long as you have an internet connection. You will not have to walk around with a laptop to demonstrate your work.

Image for post
Image for post

Now, if you’re wondering how can you make your site live on the internet, without having to pay, you’re solution is Heroku. …


The fetch() is a global method on the window object, that allows us to send web requests to the API, and retrieves a collection of data, structured in a nested hash, known as JSON. In JavaScript, fetch is built-in, it allows you to query any URL or API to get back data.

Image for post
Image for post

Basic fetch Structure

The fetch uses javascript promises to handle callbacks. Here is the basic structure of the fetch() function:

fetch(`Use URL of the data source`)
.then((response)=> {
return response.json();
}).then((json) => {
console.log(json)
})

The fetch() function with the API URL above returns an object that holds the data source you’re requesting. Call the .then() method, take the response, and fetch will return to us a response. Next, you must call the .json() method on the response to render the API’s response as JSON; this will return a promise. The second.then() receives the data and passes the Javascript object, with keys and values. Every .then() returns a new promise; passing information from one promise to next .then()


LinkedIn is one of the fastest-growing social media platforms. It currently has 706 million users and out of these 63 million of the people are in the decision making position. LinkedIn is used by freelancers, both big and small businesses for services, hiring, marketing, etc. This makes it extremely crucial for every job seekers to have a fully pledged professional LinkedIn profile. If you are a new developer or engineer in LinkedIn, I would recommend you first check out the Optimize Your LinkedIn Profile — New Developers article.

Image for post
Image for post

Introduction

2020 changed the game for everybody. The time we’re in now, it is almost impossible to meet anybody in-person to network. This makes it even more important for us to stay connected or network on LinkedIn, regardless of you have a job or not. Assuming you already have a LinkedIn profile, here are a few ways to stand out from other job seekers, network, and find the right opportunities for yourself. …


Do you want to know the easy and simple steps to create forms using React.js? Well, in this article I will walk you through the step by step process of creating React forms and use ‘new blog’ as an example.

Image for post
Image for post

Step 1: Structure of the Form

import React from 'react';class NewBlogForm extends React.Component {render(){
return (
<div>
<form>
<input type='' name=''/>
<textarea type='' name=''/>
<input type="submit"/>
</form>
</div>
);
}
}
export default NewBlogForm;

The basic React form structure includes two input tags, one of which is a submit type, and atextarea. …

About

Tanuka Das

Software Developer, technical writer, bookworm, constant learner.

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