Please enable JavaScript.
Coggle requires JavaScript to display documents.
Javascript (Create Object (Create function (Exection environment (IIFE :…
Javascript
Create Object
-
-
Create function
Exection environment
IIFE : Immediately Invoke Function Expression,just add () behind function.
-
-
1st function,treat the same as others.
-
-
-
-
-
-
After ES6 version
-
Arrow function
use {} as expression,need return word.
-
-
-
-
Spread and Rest
-
Rest
-
like arguments in function,but not the same
-
-
Array.function
-
return array
-
map() : do something in original array,length must be the same as origin.
return value
-
-
-
reduce() : fix pre-fix data,then do the same thing continuously.
Promise Object()
-
-
Promise.function
catch() : if promise has an error,Promise Object invoke rejected function,then getting return error message.
race() : Every Promise invokes synchronously,but only one can invoke then().
all() : Every Promise invokes synchronously,and responding all promises.But,if one gets rejected statement,all statement get rejected.
then( ) : if promise no error,Promise Object invoke res function,then getting response function return data.
chain : Using the feature returns Promise Object,we can call then()/catch() one by one.
-
Promise Implement.
Fetch() : Asynchronously get remote data by internet(?)Link Title
Class : the same as javascript/createObject/ES6 class. FUCK!!!!! Merge branch function needed to buy.........
-