Functions & Procedures in JavaScript (OCR A-Level Computer Science): Flashcards

📚Flashcards
Functions & Procedures in JavaScript
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

10 cards from this deck

Show

What functions & procedures encapsulate

Reusable code

Functions vs procedures: key difference

Functions return outputs; procedures just execute code

Syntax to define a function in JavaScript

function myFunction() { }

What can functions accept as inputs?

Parameters

Keyword that returns results from functions

return

Output of add(5, 3) where add returns a + b

8

Common mistake with functions

Not using return

What functions return without return statement

undefined

Why are functions central to JavaScript?

Code reusability

Three key skills for functions

Define, call, and return values

Explore OCR A-Level Computer Science Revision Notes by Topics

Explore OCR A-Level Computer Science Model Answers by Topics

Explore OCR A-Level Computer Science Quizzes by Topics

Explore OCR A-Level Computer Science Exam Questions by Topics

Join 100,000+ A-Level students studying Flashcards with us.

Select your subjects, and get access to A+ resources today.