If you’re not using TypeScript, you can still use JSDoc annotations to provide type information in your JavaScript code.
/**
* Calculates the total price.
* @param {number} price - The price of a single item.
* @param {number} quantity - The quantity of items.
* @returns {number} The total price.
*/
function calculateTotal(price, quantity) {
return price * quantity;
}