Vue.js implements the content distribution API using the <slot> element. It has some similarities to the children API of React.js.

So slots help us to distribute our content in other components. It’s specially useful when we want to create reusable widgets. In this approach we can make sure our distributed content will be exactly distributed inside the child component as we want.

A use case

I had a task to create a carousel for our landing page and this carousel should take totally different kinds of components (with different HTML layout and styling) as slides. But the frame which contains these slides should…


I was working on a project written with Nuxt.js ( As you know Nuxt.js is created on top of the Vue.js (, so they share the same component based approach. And based on that, we split the whole application into small and reusable components.

We didn’t use any ready-to-use UI library/framework for our components (such as Quasar, Vuetify) so all of our components were written by our team, because our UI designers were very detailed and we need to have flexibility and customization in any level to create pixel perfect user interfaces based on their designs.

We kept all of…

Hash tables by Ali Afsahnoudeh
Hash tables by Ali Afsahnoudeh


Hi I’m a software engineer who is working a lot with JavaScript in these days. This article is about what I learned and understand about hash table in general and it’s implementation in JavaScript.

What are Hash Tables?

Hash tables are data structures for storing key/value pairs. They also called dictionaries. They contain places called buckets or slots for keeping items. The number of these slots represents the length of our hash table. For example if we have a hash table of length 1000, it means it has 1000 slots/buckets to keep 1000 items.

Where we use them?

The run-time complexity of hash table’s actions are:

Insert: O(1)

Ali Afsahnoudeh

Software enthusiast, music lover

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store