TGStat
TGStat
Type to search
Advanced channel search
  • flag English
    Site language
    flag Russian flag English flag Uzbek
  • Sign In
  • Catalog
    Channels and groups catalog Search for channels
    Add a channel/group
  • Ratings
    Rating of channels Rating of groups Posts rating
    Ratings of brands and people
  • Analytics
  • Search by posts
  • Telegram monitoring
The Chill Coding Lounge

24 Mar 2025, 09:41

Open in Telegram Share Report

Prev Next
As I dive deeper into using pug, I have come across something called mixins

What are Mixins?

Mixin my sweat and tears into a cake *Awkward Silence*. Any who, mix ins are pieces of code that are reusable in a given file. They help push the DRY principle so that you don't have to use the same block of code time and time again.

✅ Just like functions, mixins have a name we can provide them as well as parameters which we set up. In turn they return the code block containing the provided information.

✅ We then access them by calling them into our content using + prefix alongside the mixin name and then providing the needed arguments

🚀Boom, Ansnakech is your aunt. You have 50 lines of code condensed into 5.

P.S If you've read the entire segment, you can also have JavaScript Code included using the - prefix which hides it from being rendered. This is called unbuffered code

30 0 0
Catalog
Channels and groups catalog Channels compilations Search for channels Add a channel/group
Ratings
Rating of Telegram channels Rating of Telegram groups Posts rating Ratings of brands and people
API
API statistics Search API of posts API Callback
Our channels
@TGStat @TGStat_Chat @telepulse @TGStatAPI
Read
Академия TGStat Telegram Research 2019 Telegram Research 2021 Telegram Research 2023
Contacts
Справочный центр Support Email Jobs
Miscellaneous
Terms and conditions Privacy policy Public offer
Our bots
@TGStat_Bot @SearcheeBot @TGAlertsBot @tg_analytics_bot @TGStatChatBot