*Lazy Brogrammer – Telegram
Channel created
🔥133👍111
Please open Telegram to view this post
VIEW IN TELEGRAM
11👍7🏆4🤔21
DRY - Don't Repeat Yourself
WET - Write Everything Twice

Design patterns for developers.

🦥@LazyFrontender
Please open Telegram to view this post
VIEW IN TELEGRAM
👍19😁3🔥21
What's the point of the second argument in element.classList.toggle?

The toggle method has an optional second argument that will force the class name to be added or removed based on the truthiness of the second argument. For example, to remove a class (if it exists or not) you can call element.classList.toggle('classToBeRemoved', false); and to add a class (if it exists or not) you can call element.classList.toggle('classToBeAdded', true);
👍9🔥7👏2111
Please open Telegram to view this post
VIEW IN TELEGRAM
16😁3🐳2111
How to call function constructor without "new" keyword ?

🦥@LazyFrontender
9👍322🤔1