Originally published at https://dev.to on January 20, 2020.

Setting up custom keys to focus previous/next element in the tab index

Introduction

On a web page, we have different focusable elements and they follow a default tab order. We can navigate around and change focus from one focusable element to another using Tab and Shift + Tab keys.

You can easily check this behavior on any website. Just press Tab to move your focus to the next focusable element and press Shift + Tab for the previous one.

We can manipulate this default Tab flow and create our own flow using tabindex but this is not the focus of this article. …


Note: This is a section taken from the service worker documentation at MDN. You can visit and read the whole documentation here

This article provides information on getting started with service workers, including basic architecture, registering a service worker, the install and activation process for a new service worker, updating your service worker, cache control and custom responses, all in the context of a simple app with offline functionality.

Registering your worker

The first block of code in our app’s JavaScript file — app.js — is as follows. This is our entry point into using service workers.

if ('serviceWorker' in navigator) { navigator.serviceWorker.register('/sw-test/sw.js'…

Creating a class

JavaScript is a prototype-oriented language and it is possible to simulate classes and inheritance with ECMAScript 5.

The flexibility of functions in JavaScript allows us to simulate encapsulation we are used to when dealing with classes. The trick we can use for that is to extend the prototype of an object:

var Animal = (function () {
function Animal(name) {
this.name = name;
}
// Methods
Animal.prototype.doSomething = function () {
console.log("I'm a " + this.name);
};
return Animal;
})();
var lion = new Animal("Lion");
lion.doSomething();

We can see here that we defined a class with properties and methods.

The…


Destructuring assignment is a cool feature that came along with ES6. Destructuring is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables. That is, we can extract data from arrays and objects and assign them to variables. Why is this necessary?

Imagine if we want to extract a data from an array. Previously, how will this be done?

var introduction = ["Hello", "I" , "am", "Sarah"];
var greeting = introduction[0];
var name = introduction[3];
console.log(greeting);//"Hello"
console.log(name);//"Sarah"

We can see that when we want to extract data from an array …


Short answer: Absolutely yes.

Condition: You learn programming not merely to mug up syntax but to an extent that you are able to apply that knowledge to create something and solve the problems.

I can give you a lot of examples where people are working as a software developer inspite of being from a non CS department or even non B.Tech degree holder.

One good example is my mentor and student experience lead Mr. Akshit Jain at Udacity. He is not a Cs grad but still he is a google certified android developer. You can search him on YouTube.


Hello, I am Shubham Prakash and I am pleased to see you are here to know a bit about me. First, let me tell you a bit about my background-
I spent my childhood at Garhara (It is in Begusarai district, Bihar) and did my primary schooling there in Kendriya Vidyalaya, Garhara.
Currently I am a first year student of B.Tech in Information Technology at Haldia Institute of Technology, WB, India.

I love Computer Programming, Software development, Technology and I want to become a software engineer. But It’s a matter of fact that initially, I was not so interested in…


Most of you guys have already started working on GitHub projects but many of you might have just started modifying the code in the master branch which is not a good practice.

On GitHub, we can have multiple branches on which we can work independently.
So you may ask -

Why do we need to work on the branch other than master branch?

So, here is the answer- Suppose you forked the project repo and started working on it. you made some changes to it. This way you modified the master branch of the repository, Now you made a pull…


Hello guys here is a quick tutorial for those who are new to GitHub and don’t know how to make a pull request on GitHub,

I have already made a tutorial on how to get started with git, fork the project repository and set up origin and upstream. So, if you want to have a look at it then please visit this link- https://medium.com/@shubham.prakash2308/here-is-how-to-contribute-to-the-udacity-collaborative-projects-on-github-616aee567a6a

Now that you have done with forking the repo, setting up your local working repository, adding origin and upstream now what to do next.

After changing the files and source code, adding feature etc. in your…


Contributing to open source can be a rewarding way to learn, teach, and build experience in just about any skill you can imagine.

Hi guys some of us are having problems to start contributing the collaborative Projects on GitHub. Here is a quick guide I made for you guys to get started-

STEPS INVOLVED IN THE PROCESS-

STEP 1: Create your Github Account.

(Click to know more how to create GitHub account.)

STEP 2: Download git on your computer.

(Click to know more how to install git on your PC)

STEP 3: Go to the original repository in which you…

Shubham Prakash

I write code…

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