/javascript-learn

Here we learn JavaScript, starting from scratch and go on to advanced concepts like OOP. We concentrate on the language itself here, with the minimum of environment-specific notes.

GNU General Public License v3.0GPL-3.0

JavaScript ES6

Welcome

//----------------------------------------------------//
//       Author: Natan Cabral                         //
//  Description: No panic, this is simple javascript  //
//----------------------------------------------------//

// constant object
const welcome = {
  message: 'Welcome',
  person: 'my little',
  subject: 'friend',
}
// arrow function destruction 
let GoodMorning = ({message: ms, person: ps, subject: su}) => {
  return ` ${ms} ${ps} ${su} `
}
// destruction array, you can change
let hi = [...['Hello!'], GoodMorning(welcome)]
// log
console.log("%c" + hi.map(e=>e).join(''), "color:green; font-size: 25px"); 
// map not necessary ;)

Advanced

Basic

Equality

  • Equality
  • Logical Operators
  • Switch Statement
  • Null and Undefined
  • Truthy and Falsy

While

  • while Loops
  • do while loops
  • for loop
  • Array Iterators
  • forEach
  • Math Object
  • Date Object

DOM

  • Get Element By ID
  • Get Elements By Tag Name
  • Get Element By Class Name
  • Query Selector and Query Selector ALL
  • Navigate the DOM - Children
  • Navigate the DOM - parentElement
  • getAttribute() setAttribute()
  • classList and className
  • createElement - createTextNode - appendChild
  • insertBefore
  • replaceChild
  • prepend innerText
  • remove removeChild
  • innerHTML and textContent
  • Change CSS with style property
  • Click Event
  • Function Reference
  • Mouse Events
  • Key Events
  • Event Object

String