javascript tutorial

初级

https://www.javascript.com/learn/javascript/strings

basic

对于一个javascript对象,包含properities和methods

Strings

Numbers

Booleans

Operators

Variables

Functions

Conditionals

Arrays

Objects

conditions

if(){
}
else if(){
}
else{
}

loop

for (let i = 0;i<10;i++){
  console.log(i);
  }

while (condition){
// run code
}

do {
//run code
}
while (condition)


break
continue

function

function myFunction(){
// do sth
}


var name = function(){
                  // run code
                  }
                  

ajax

instll node

brew install node

npm是node的包管理器

浏览器相关

alert()
confirm()
prompt()

document

css选择器
document.querySelectorAll()

document.createElement()
.setAttribute()
.addEventListener()
.removeEventListener()

browser API

DOM

The code syntax looks different, but the concepts are still largely the same. thinking like a programmer

Event

As mentioned above, events are not really part of the core JavaScript — they are defined in browser Web APIs.

Event Capturing Event bubbling