Generics in Typescripttype Input = number | string function firstElement(arr: Input[]): Input{ return arr[0]; } const value = firstElement(["harsh", "chandwani", 9, 8, 7]); console.log(value); //console.log(value.toUpperCase()); //now let us take the generics into ...1 min read·harshchandwani.hashnode.devAug 25, 2024
Enums in TypeScriptHere is the typescript file where I have compared enums with types //Okay now lets do this //basically when want to have a function, that should only some particular values, and it will be string //one option is to create a if statment that can handl...2 min read·harshchandwani.hashnode.devAug 25, 2024
Getting Started with ASP.NET Core MVC: Creating and Configuring EndpointsAdding Endpoints2 min read·harshchandwani.hashnode.devJun 2, 2024
Writing my First CRUD app in Express for MongoDBIn the realm of web development, understanding CRUD operations is fundamental to creating robust and dynamic applications. CRUD, an acronym for Create, Read, Update, and Delete, represents the four essential operations that can be performed on data w...3 min read·harshchandwani.hashnode.devJan 8, 2024
Writing my First Lines in Express JSSo, in the previous days, I have enrolled in Harkirat’s 100xDevs 0–100. I have known Frontend but to explore, I took some base classes and coded by first HTTP Server. So, writing code is one thing and making it accessible to people is one thing, Expr...2 min read·harshchandwani.hashnode.devDec 26, 2023