Photo by Jordan Harrison on Unsplash

As a Javascript developer, often we focus on writing more and more code and getting this done as soon as possible. But in the process of writing the code faster, sometimes we make the program slower than we expect. One of the many reasons for that is we don’t really care about memory while writing the code. Many of us run the program on a high-end device, which has the latest GPU, CPU and has lots of computational power like a supercomputer. So We don’t actually find our program slower. But that is not the case with end-users. Our users…


Photo by Markus Spiske on Unsplash

In this article, I am going to discuss javascript hoisting and will be busting some of the myths regarding it.

Every Javascript developer comes through the term Hoisting while learning the language. But most of them get it wrong.

These are the two most popular myths about Hoisting

  • During compilation, all the variable and function declaration is moved to the top of the program
  • const and let doesn’t hoist

So let’s talk about the first myth,

Does all the variable and function declaration gets moved to the top of the program?

“NO”

What! If this is not the case then…


What is your favorite debugging technique ? Mine was using console.log until I came to know about there is something called debugger. So in this article I will write about debugger , terms related to debugger and why should we use debugger instead of console.log .

Before we start debugging our code we need to know the few terms related to debugger and of-course what the heck is debugger . So tighten your seat belt be ready for thrilling ride of debugging .

A debugger or debugging tool is a computer program that is used to test and debug other…


Image source

In this post we will write a very simple RESTful API for user registration and login .We will be using mongodb official mongo-go-driver for populating data.We will use jwt-go to decode, verify and generate Authentication tokens.

In this post we will write following end points :

  1. /register POST ( New user registration)
  2. /login POST (Existing user can login )
  3. /profile GET (To get user details)

I am assuming that you have already installed go in your system and set the go path. If not then you can follow https://golang.org/doc/install and install go on your system.

Project setup

  1. Create a new folder go-login

Shiv kumar

Fullstack Frontend Developer, open-source lover, Here to write and read tech. https://www.linkedin.com/in/shiv-kumar-201415

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