5min chapter

HTML All The Things - Web Development, Web Design, Small Business cover image

JavaScript Basics: Learn These Concepts First

HTML All The Things - Web Development, Web Design, Small Business

CHAPTER

JavaScript Functions

A function in JavaScript is similar to a procedure, a set of statements that performs a task or calculates a value. The way I look at functions is I see them as code snippets that you can call whenever you need to by name and as many times as you need to. So for example, you might have a function that you will name, let's just say we're going to call the function add numbers and add numbers. That function is sole purpose is to add two numbers together that you now want to store into a sum variable. You get to choose the name. Now you can call this function whenever you'd like.

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode