Learn Overloading From the jQuery Function

How to do function overloading using the typeof operator

Photo by Todd Quackenbush on Unsplash

If you worked with jQuery before you may have noticed that the jQuery function is overloaded. It means that when calling the function with different kinds of argument it behaves in different ways.

--

--

--

Learn more on JavaScript, functional programming, and front-end development.

Recommended from Medium

Geitpl

Vuex made simple — getting started!

Props in Javascript React

Help Your Food Delivery Business Conquer the Streets With React Native

Taking extra calories helps exercising women avoid menstrual disorders

Taking extra calories helps exercising women avoid menstrual disorders

Getting Started with TypeScript

Can you please refresh (Or how we version our Single-Page Application)

Setting up Google Analytics and cookie policy in Vue.js

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
Cristian Salcescu

Cristian Salcescu

Author of Functional Programming in JavaScript. Enthusiastic about sharing ideas. https://www.amazon.com/gp/product/B08X3TPCQ8

More from Medium

3 Concepts of Functions to Add to Your Arsenal as a JavaScript Developer

SOLID Principle & Introduction to JS

How to detect Emojis With JavaScript

Coding Bootcamp Week 10/13: Building the Frontend and Why I Found it Hard