TypeScript offers JavaScript developers a robust solution to writing bug-minimal code. It offers more types and stronger type-checking than JavaScript. We’ll be exploring tuples and arrays in TypeScript.

Typically, a tuple is an array with fixed size and known datatypes. This is to say; you’d use a tuple for a static, well-defined array:

  • The number of elements of the array is fixed.
  • The type of elements of the array need not be the same.
  • The type of each element is known.

It is a TypeScript feature that lets you restrict an array to a specific amount and type of values


What is a Module?

A module is a separate program file in Node.js. When creating a module, it can be classified as a grouping of all related functions into a file.

getYear = function() {
return new Date().getFullYear();
}
getMonth = function() {
return new Date().getMonth();
}

Purpose of a Module

Keeping all functional programs in a single file is really hard to maintain and deal with during the development. Having the code split up into multiple accessible files allows us to have appropriate file names for every file. This way you can easily identify the module and know where to find it at times of need. …


What’s up, guys?!

In this article I'll show you how to make a video as a background to any content in React js just by using normal HTML and CSS without any other third-party packages. So let’s get started!!

first things first

create new React project, so hit in your preferred CLI next command

npx create-react-app background-video

second step

Create backgroundVideo component. Inside your project specifically in src.

Now let's get our hands dirty!

Inside the backgroundVideo component. First, create a functional(statless) component as follow.

Ibrahim AlRayyan

React Developer, Mobile cross-platform developer, JavaScript Lover

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