Loading...
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
Functions are reusable blocks of code that perform a specific task. They help in organizing code, reducing redundancy, and improving readability.
return_type function_name(parameters) {
// code to execute
return value;
}Write once, use many times throughout your program.
Hide complex logic behind a simple function call.
Functions that don't return any value use the void return type. Useful for printing or modifying global state.