What are Arrow Functions?

An arrow function is a concise alternative way to write functions in JavaScript(introduced in ES6, modern JavaScript). Arrow functions may be concise, but have a few limitations.

Changing a regular function into an arrow function

Lets start off with a regular function:

An arrow function does not need the ‘function’ keyword so that can be taken out, and add the ‘=>’ after the parameter:


Pre-work

Before starting the coding boot camp, you are given pre-work, a set of lessons on different languages like “Ruby”, “HTML”, and “Javascript”. The purpose of the pre-work is so that everyone who starts a cohort of the boot camp can be around the same level of knowledge. Having no prior knowledge of any coding languages; my anxiety levels were rising before I even started. The problem was that at this point, I didn’t know “how to learn to code”.

Christopher Kim

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