We can divide a program into procedural components or modules called functions in JavaScript. We are already familiar with functions like console.log(), prompt(), and length(). Functions can be copied and reused in a programming technique called a modular or procedural approach, also known as the divide and conquer approach. We should always try to design functions that can be reused in other programs too.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy