Http MethodIt contains many methods. GET POST PATCH PUT DELETE --> GET Method:- When we send a request to the server, this is a GET method. Suppose you want to search live match score go to the url of the web browser and search cricbuzz then the request ...Oct 13, 2023·2 min read
Array DestructingLet's say we have an array that contains five numbers, like this: let array1 = [1, 2, 3, 4, 5] To get the elements from the array, we can do something like getting the number according to its indexes: array1[0]; array1[1]; array1[2]; array1[3]; arra...Oct 6, 2023·3 min read
Higher Order FunctionHow to Pass a Function as an Argument to Another Function In this section, we will see how we can send a function as an argument and ultimately how it helps us write cleaner code. Consider the following code in which we want to create a function that...Oct 6, 2023·2 min read
Schema in MongooseThe schema in Mongoose is used to allow you to define the fields stored in each document along with their validation requirements and default values. they also define document instance methods, static Model methods, compound indexes, and document lif...Oct 5, 2023·1 min read
Environment variableToday we will learn ab .then((conn)=>{ console.log(`Connected to DB: ${conn.connection.host}`); }) Basically, it provides ${conn. connection.host} hostname. Environment Variable Environment variables are basically used for storing sens...Oct 5, 2023·2 min read
Mongoose Data BaseToday we will learn about the Mongoose database schema. Firstly we import the Mongoose model from the above code. Inside the Mongoose model, it contains the schema method we use objects inside the schema like the above example elaborates. we use the ...Oct 5, 2023·1 min read