JavaScript Basics: Arrays, Functions & Callbacks
Here is a quick recap of some fundamental JavaScript concepts I revised today:
Array Length (.length)
mark.length gives the total size (number of elements) in an array.
Mixed Data Types in Arrays
JavaScript arrays can store different types of data together:
const ar = [10, 20, 30, "abc", true];
The .filter() Method
numbers.filter(display)
numbers ➔ Array name
display ➔ Function passed inside .filter()
Callback Functions
A callback function is a function passed as an argument to another function.
Example: filterdemo(display)
Arrow Functions (=>)
A concise way to write functions in JavaScript.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)