0% found this document useful (0 votes)
21 views

Theory-Lectures-V2 40-49

The document discusses different types of functions in JavaScript: function declarations, function expressions, and arrow functions. It explains that functions allow receiving input data, transforming it, and outputting data. Functions are made up of parameters, a function body, and can return values. The document also provides tips on how not to fail when learning to code, such as having a clear goal, understanding how code works rather than just copying, practicing coding, and not getting discouraged when skills are not perfect.

Uploaded by

Graficki Radovi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Theory-Lectures-V2 40-49

The document discusses different types of functions in JavaScript: function declarations, function expressions, and arrow functions. It explains that functions allow receiving input data, transforming it, and outputting data. Functions are made up of parameters, a function body, and can return values. The document also provides tips on how not to fail when learning to code, such as having a clear goal, understanding how code works rather than just copying, practicing coding, and not getting discouraged when skills are not perfect.

Uploaded by

Graficki Radovi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

SECTION

JAVASCRIPT FUNDAMENTALS – PART 2

LECTURE
FUNCTIONS CALLING OTHER
FUNCTIONS
CALLING A FUNCTION INSIDE A FUNCTION: DATA FLOW

2
2
8

3
8
8

2
SECTION
JAVASCRIPT FUNDAMENTALS – PART 2

LECTURE
REVIEWING FUNCTIONS
FUNCTIONS REVIEW; 3 DIFFERENT FUNCTION TYPES

Function declaration
Function that can be
used before it’s declared

Function expression
Essentially a function
value stored in a variable

Arrow function
Great for a quick one-line
functions. Has no this
Three different ways of writing functions, but they all work in a
keyword (more later...)
similar way: receive input data, transform data, and then output data.
FUNCTIONS REVIEW: ANATOMY OF A FUNCTION

Parameters: placeholders to receive input Function body: block of code that


values. Like local variables of a function we want to reuse. Processes the
Function name
function’s input data

return statement to
output a value from
the function and
terminate execution

Calling, running or invoking


the function, using ()

Variable to save returned Arguments: actual values


value (function output) of function parameters, to
input data
DEVELOPER SKILLS &
EDITOR SETUP
SECTION
DEVELOPER SKILLS & EDITOR SETUP

LECTURE
LEARNING HOW TO CODE
HOW TO FAIL # AT LEARNING HOW TO CODE

He didn’t have a clear goal at the beginning of his journey

He started by watching courses and reading tutorials, but he would just copy the
code without caring how it works. Sometimes he would just copy and paste code!

He didn’t reinforce what he was learning by doing small challenges or taking notes

He didn’t practice coding, and didn’t come up with his own project ideas

He quickly became frustrated when his code was not perfectly clean or efficient

He lost motivation because he thought he could never know everything

He was learning in isolation

John After finishing a couple of courses, he thought he now was a web developer and
(not actually…) could start applying to jobs. But he couldn’t even build an app on his own!

You might also like