Is it possible to use ternary operator for console.log?

I thought this would be something simple to do, but I don’t think it’s possible, why is that? This is what I’m trying to do. console.log("hello") ? bool : ""; This gives me an error: Expected an assignment or function call and instead saw an expression. Not sure exactly what that means. >Solution : Yes.… Read More Is it possible to use ternary operator for console.log?

Display list and its items, also display items counts

"I want to display the list Categoty and its items count" Here i have both the List and the Dictionary public static List<Category> categories = new List<Category>(); public static Dictionary<string, ProductInfo> ProductInformation = new Dictionary<string, ProductInfo>(); Here are the AddProduct method static Dictionary<string, ProductInfo> ProductDictionary { get; } = new Dictionary<string, ProductInfo>(); static void AddProduct(ProductInfo… Read More Display list and its items, also display items counts

Bootstrap 5 data-bs-toggle vs data-toggle. Adding the bs breaks my whole Popper

I’m one month into learning Web Development. From what I’ve read, the data-bs-toggle is the newer name for Bootstrap 5. What is the difference between Bootstrap data-toggle vs data-bs-toggle attributes? My code is simple. In the head, I’ve included CSS, jQuery, and JavaScript Bundle with Popper. In the body, I have two links with a… Read More Bootstrap 5 data-bs-toggle vs data-toggle. Adding the bs breaks my whole Popper