reading-notes

Useful website - replit.com //console.log(“Hello!”); let y = 5+5; console.log(y) In Javascript, you will not get anything after an error is found. It is a top-down

Functions are one of the fundamental building blocks in JavaScript. A function in JavaScript is similar to a procedure—a set of statements that performs a task or calculates a value, but for a procedure to qualify as a function, it should take some input and return an output where there is some obvious relationship between the input and the output. To use a function, you must define it somewhere in the scope from which you wish to call it.

Function declarations

A function definition (also called a function declaration, or function statement) consists of the function keyword, followed by:

Control flow

The control flow is the order in which the computer executes statements in a script.

Code is run in order from the first line in the file to the last line, unless the computer runs across the (extremely frequent) structures that change the control flow, such as conditionals and loops.

JavaScript Function Syntax

A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses ().

Function names can contain letters, digits, underscores, and dollar signs (same rules as variables).

The parentheses may include parameter names separated by commas: (parameter1, parameter2, …)

The code to be executed, by the function, is placed inside curly brackets: {}

Function Invocation

The code inside the function will execute when “something” invokes (calls) the function:

You can learn more about functions from these websites:

These links may also be useful for understanding JavaScript:

  1. identify the shirt
  2. advance to the shirt
  3. movement to reach for the shirt
  4. close hands around the shirt
  5. spread shirt between two hands
  6. Rotate shirt, if neccessary, so the back of the shirt is facing you
  7. identify left sleeve
  8. insert left arm into shirt through the left sleeve, from the bottom of the shirt
  9. hold on to left sleeve with left hand
  10. identify right sleeve
  11. insert right arm through right sleeve, from the bottom of the shirt
  12. adjust the shirt so it is comfortably around your torso
  13. let go of left sleeve with left hand
  14. raise both arms above head
  15. lower shirt, allowing head to enter through the neck hole
  16. grab bottom of shirt with both hands
  17. pull bottom of shirt to the waist