Mind map
JavaScript Fundamentals
Map content
JavaScript Fundamentals
Variables
- Primitives
- Number
- Strings
- Booleans
- var
- Descontinued
- let
- Take the value just inside the scope
- const
- Cannot change the data inside it
- Must have a value on initialize
- null
- It's an object
- Can cause bug
- It's an object
- Primitives
NodeJS
- Runs javascript code in backend
- Libs
- Errors lib
- https://nodejs.org/api/errors.html#errors_errors
- console lib
- https://nodejs.org/api/console.html
- Errors lib
Operators
- Converter
- Explicite
- string2number
- Number(string)
- number2string
- String(number)
- string2number
- Implicite
- ==
- Can cause bug
- ==
- Explicite
- Comparison
- ===
- Compare variables values and types
- BEST PRACTICE
- Compare variables values and types
- ==
- Compare just variables values
- ===
- Lib Operators
- https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Guide/Expressions_and_operators
- Ternary
- variable1 >= variable2? "Case True" : "Case False"
- Template String
- string = `A string goes here ${variable1}, and ${variable2} here.`;
- Can be used together ex: `${age >= 18 ? yes : no}`
- string = `A string goes here ${variable1}, and ${variable2} here.`;
- Repetition
- for
- for(variable; condition; variable++{ block of code }
- for
- Converter
Functions
- function nameOfFunction(parameters){ block of function}
- Libs
- math
- https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Math#description
- math
- Functions / Expressions
- variable = function(parameters) {return output}
- Arrow Function
- Behavior like expression
- let variable = (parameter1,parameter2,parameterN) => return output
- Callback
- https://developer.mozilla.org/pt-BR/docs/Glossary/Callback_function
- array.forEach(element,index)
- Not returnable values
- array.map
- Returns an array with values
Features
- dynamic typing
- Untyped
- multiple paradigms
- Hoisting functions and variables
- multiple paradigms
- Untyped
- dynamic typing
Data Structure
- Array
- Methods
- https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Array
- array.pop
- - element on last index
- array.push
- + element on last index
- array.slice
- Split an array
- array.splice
- - elements on specific indexes and + element
- array.concat
- concatenate two arrays
- array.includes
- Returns true or false
- array.indexOf
- Returns the index of the element inside array
- sort
- https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
- Methods
- Array
Objects
- key-value
- objectName.key
- objectName = {key1: value, key2: value, keyN: value}
- delete
- delete objectName.key
- Arrays can be used as values
- Manipulation
- https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Object/create
- Spread Object
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax
- Prototype
- function objName (keys){this.key = key}
- let newobject = new objName()
- function objName (keys){this.key = key}
- inheritance
- Destructuring
- [...arrayName1,...arrayName2]
- Classes
- Attributes
- Characteristics
- Methods
- Behaviors
- Inheritance
- Extends
- Attributes
- Is a class instance
- key-value
Information
- Description
- Generalista TI Carreira Profissional (JavaScript) Mind Map on JavaScript Fundamentals, created by Adriano Soares on 04/02/2022.
- Created by
- Adriano Soares
- Views
- 2
- Rating