DEV Community

Discussion on: What's the Worst Code You've Ever Seen or Written?

Collapse
 
niorad profile image
Antonio Radovcic

Code that works is never bad, but this is probably the most hacky one from my last project:

.flatpickr-prev-month[style="display: none;"],
.flatpickr-next-month[style="display: none;"] {
    display: block !important;
}
Collapse
 
renegadecoder94 profile image
Jeremy Grifski

What does this do?

Collapse
 
niorad profile image
Antonio Radovcic

It displays an element which has been set invisible by a JavaScript-Library that I didn‘t want to hack. There was no option in the API to do it.

Thread Thread
 
d1p profile image
Debashis Dip

Cleaver code is not bad code xD