SQL Joins

We’ll use two simple tables as reference: Table: Employees EmpIDNameDeptID1Alice102Bob203Charlie304DavidNULL Table: Departments DeptIDDeptName10HR20IT30Finance40Marketing 1. INNER JOIN Returns only the matching rows between two tables. SELECT e.Name, d.DeptName FROM Employees e INNER JOIN Departments d ON e.DeptID = d.DeptID; SELECT e.Name, d.DeptName FROM Employees e INNER JOIN Departments d ON e.DeptID = d.DeptID; Result: NameDeptNameAliceHRBobITCharlieFinance…

0 Comments

SQL grouping concepts

1. GROUP BY GROUP BY is used to group rows that have the same values in one or more columns. It’s often used with aggregate functions like COUNT(), SUM(), AVG(), MAX(), MIN(). Example: SELECT department, COUNT(*) AS employee_count FROM employees GROUP BY department; SELECT department, COUNT(*) AS employee_count FROM employees GROUP BY department; 👉…

0 Comments

Mocha

Mocha is a JavaScript test framework running on Node.js, commonly used for testing applications (both frontend and backend). It provides a structure for writing unit tests and integration tests, making sure your code behaves as expected. Mocha doesn’t come with an assertion library by default, but it works well with popular ones like Chai,…

0 Comments

Jasmine and Karma

🔹 What is Jasmine? Jasmine is a behavior-driven development (BDD) testing framework for JavaScript. It’s mainly used to test JavaScript code (both frontend and backend). It provides functions like describe(), it(), and expect() to write human-readable tests. No need for DOM or browser—it can run independently. 🔹 What is Karma? Karma is a test…

0 Comments

Jest

Jest is a JavaScript testing framework maintained by Meta (Facebook). It’s widely used for testing React applications, but it works with any JavaScript/TypeScript project. It provides features like: Unit testing: testing small pieces of code (functions, components). Snapshot testing: ensuring UI doesn’t change unexpectedly. Mocking: simulating functions, APIs, or modules. Zero configuration: works out…

0 Comments

Arrays and Objects

In JavaScript, we often work with Arrays (lists of items) and Objects (key-value pairs). JavaScript gives us built-in methods to manipulate data in arrays in a cleaner and more powerful way. 🔹 Arrays in JavaScript An array is a list of values stored in a variable. let numbers = [1, 2, 3, 4, 5];…

0 Comments

Vite

What is Vite? Vite is a fast tool for building websites. It helps you see your changes instantly while coding, instead of waiting for the whole site to reload. Think of it as a super-fast “web server + builder” for modern web apps. Example Imagine you want to make a small React app: Create…

0 Comments

Webpack

Webpack is a module bundler for JavaScript applications. It takes modules with dependencies and generates static assets representing those modules. In simple terms, it bundles your JavaScript files (and optionally other assets like CSS, images, etc.) into a single file (or a few files) that browsers can understand. Webpack is especially useful for modern…

0 Comments

Conditional rendering in React

Conditional rendering in React is a way to render different UI elements or components based on certain conditions, usually determined by state or props. Essentially, it lets your component “decide” what to display dynamically. React uses JavaScript logic inside JSX, so you can use if statements, ternary operators, or logical && for conditional rendering.…

0 Comments

Forms and Controlled Components in React

1. Forms in React A form in React is a way to gather input from the user, like text fields, checkboxes, radio buttons, etc. In React, handling forms is a little different than plain HTML because React controls the state of the input elements. 2. Controlled Component A controlled component is an input element…

0 Comments

End of content

No more pages to load