Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Destructure Named CSS-in-JS Arguments to use in JavaScript Mixin Functions


    Often times it's hard to remember which order variables have to be used. This is where the concept of named arguments is helpful. The exact same name can then be used inside of a mixin or function.

    To name argument in Sass, you need to put a name before the argument, a similar approach can be used with JavaScript functions. In this lesson, you'll see how you can pass in an object and use that objects keys as the named arguments for the function.