文章序
总是会看到前端模块化的这几个技术,今天一次性整理,如有错误欢迎评论指正!
AMD
异步加载,依赖前置,前置依赖建议写在前引用,在所有模块加载完成后立即执行回调函数,用户体验好,不容易造成卡顿
需要引用require.js
//math.js
define([], function () {
function add(a, b) {
return a + b;
}
ret
1338 Reduce Array Size to The Half 数组大小减半
Description:
You are given an integer array arr. You can choose a set of integers and remove all the occurrences of these integers in the array.
Return the mi
156 Binary Tree Upside Down 上下翻转二叉树
Description:
Given the root of a binary tree, turn the tree upside down and return the new root.
You can turn a binary tree upside down with the following steps:
Th