• Custom native events
    • Create a custom event:const myEvent = new Event(),new CustomEvent(),document.createEvent('CustomEvent')
    • Listening for custom events:document.addEventListener('myEvent', callback)
    • Triggering custom events:document.dispatchEvent(myEvent)
  • Promise
    • The short versionPromise(Asynchronous is not supported)
    • handwrittenPromise(resolve,reject,then)
    • implementationPromise.all()
    • implementationPromise.race()
    • implementationPromiseAsynchronous scheduler
  • Anti-shake and throttling
    • Image stabilization
    • The throttle
    • Anti-shake + throttling (anti-shake that must be triggered)
  • Shallow copy and deep copy
    • Handwritten shallow copy
    • Object.assign
    • Shallow copy Other methods:concat(),slice(),[...arr]
    • Handwritten deep copy
    • JSON.parse(JSON.stringify())
    • The Lodash_.cloneDeep()
    • JQuery$.extend()
  • call+bind+apply
    • nativecallAnd handwrittencall
    • nativebindAnd handwrittenbind
    • nativeapplyAnd handwrittenapply
  • JSONP
    • Rationale: UsescriptOf the labelsrcThere are no cross-domain constraints to complete the implementation
    • Pros and cons: OnlyGET; Good compatibility
    • Simple implementation: Passurl, params, callbackKey, callbackTo define theJSONP()Method parameters
    • Consider multiple calls: Add array save based on simple implementationcallbackThe return of
  • new
    • Three lines of code handwrittennew
    • handwrittennewFive characteristics of the
    • Full version handwritingnew
  • other
    • Object.create()
    • ES5 implements class inheritance
    • instanceof
    • Corrification: Begadd(1)(2)(3)
    • The iterator
    • Ajax
    • Array flattening: hand-torn,flat(),reduce()
    • Array deduplication: hand tear,Set,filter()
    • other