Struggling to Understand Functions—Any Tips or Resources?

May 11, 2025 1 answer
Asked by CuriousCoder92
Hey everyone! I'm having a tough time wrapping my head around functions in programming. While I can handle simple for loops just fine, I feel completely lost when it comes to more complex tasks involving functions. I'd appreciate any tips on where to find better information or recommended YouTube videos that explain complex functions more clearly. Thanks!

Answers

TechWhiz123
Functions are basically chunks of code that you give a name to, allowing you to reuse them throughout your program. They can take inputs, known as arguments, and perform operations on them. For instance, a simple function could return the number 3 every time you call it. If you had a function that doubled a number, you’d call it with an input and get back double that number. Can you share what specifically confuses you about writing functions?

LearningLingo: I get the idea of functions, but writing one is where I struggle. For example, I need to create a function that takes an array and returns it in reverse without using the built-in reverse() method. I can get the answers from chats or Google, but I still feel lost. How do I learn from that?

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions