- What is CRUD operation? Ans: CRUD is the short form of Create, Read, Update, Delete. Let’s think about a shopping mall. There are many products of different quality. If we publish a website of this mall we need to add some products, delete some products, update the information of the products and see the information of the products. Suppose at first we add a product and the owner buy 10 pieces of it. So the quantity is 10. When a customer buys 2 pieces of them the quantity is updated to 8. Again if the owner buys more 5 piece product the total product quantity is updated to 13 pieces. If a customer order 10 pieces of them, the owner sees the quantity, which means he is reading the information and giving the customer 10 of them. If any of the products would become backorder or harm by any way or he sells all of the products the owner just delete the products from the products list. Hence CRUD operation is executed.
- What is a JWT token. Ans: JWT token gives access to the page or section only for the real claimant. It is more secure than the private route. I usually use this in the case of the admin panel. When a user registers a JWT token is created for him. This JWT token usually is stored in Local Storage. If any user searches in the right way in the search bar without being an admin he can access the admin routes. But if we use the JWT token it checks the JWT token info and then gives access to the admin.
- What is Mongoose? Ans: Mongoose is a well-structured version of MongoDB. It is more friendly with node.js. We use mongoose to perform the tasks first. Mongoose is more straightforward.
- What is Aggregation? Ans: Aggregation operation processes multiple documents and returns computed results. It is used basically for Groping values from multiple documents Perform operations on the grouped data Analyze data changes
- What is Express Js? Ans: Express js or simply called express is a well-structured and open-source framework of NodeJs. It is used for back-end web applications. It makes easier the task of Node Js.
- How does Node JS work? Ans: Node Js is a Javascript runtime. When we want to execute a javascript code we need a Javascript runtime environment. JS engine, event loop, call stack, memory heap, API together make a JavaScript runtime environment. Js engine is the heart of the JavaScript runtime environment. Node Js uses the most popular JS engine V8 engine to execute JavaScript Code. When a Javascript code is put in the V8 engine it goes through 3 phases. Parsing, compilation, execution. In the parsing phase, syntax parser pass the JS code to Abstract Syntax Tree. Then The Abstract Syntax tree goes to the compilation phase. In the compilation phase, the interpreter interprets the codes and returned them to the execution phase. As well as the compiler also tries to get as much code it can optimize. Then the compiler also returns the code to the execution phase and the execution phase just executes the code. When a JS code is created a global execution context is created on the call stack. The event loop work as a gatekeeper. It sees that if the call stack is empty then it gives permission to the execution contexts of the memory heap. The garbage collector removes the garbage data from the memory heap by using mark and sweep algorithm
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)