I am a JavaScript Front End Developer focused on ReactJS and animations.
Life is in phases, men are in sizes. Putting in constant effort will result in growth and development. It may seem like very little progress, but something is happening. Efforts are building up and will result into something great. It can be diffic...
Description Unions Unions are used to combine more than one data type to be used on a variable. This is how it is done; // This can be used to declare multiple data types in a variable let combined: (string | number)[] = []; //When using unions on ar...
Description Data types can be explicitly declared in TypeScript. Although TypeScript automatically infers a data type on a variable declared. Learning material used is Net Ninja's TypeScript course on YouTube. Here is how it is done; Example 1: Stri...
Description This is used to describe the general structure of a function, the argument it takes in and the type of data it returns. // example 1 let greet: (a: string, b: string) => void; greet = (name: string, greeting: string) => { console.log(...
Description Functions can be declared this way using TypeScript. let greet: Function; //greet has been set to a function. Note that it has to be Function with a capital F. greet = () => { console.log('helllo') }; greet(); //specifying data type...
Description Objects are declared this way in TypeScript let person = { name: 'marko', gender: 'male', age: 30 }; //The data type of the person variable is object. Quick Note If you declare a variable to be a particular data type, you can't ch...