JS回调函数--简单易懂有实例 初学js的时候,被回调函数搞得很晕,现在回过头来总结一下什么是回调函数. 我们先来看看回调的英文定义:A callback is a function that is passed as an argument to another function and is executed after its parent function has completed. 字面上的理解,回调函数就是一个参数,将这个函数作为参数传到另一个函数里面,当那个函数执行完之后,再执行…
C# -- 模拟扑克牌发牌 1. User 类: 玩家 public class User { private List<PaperCard> listCard = new List<PaperCard>(); public string Name { get; set; } public User(string strName) { this.Name = strName; } public void Add(PaperCard p) { listCard.Add(p); }…
如果想要了解mock模拟数据的话,请看这篇文章(https://www.cnblogs.com/tugenhua0707/p/9813122.html) 在实际应用场景中,总感觉mock数据比较麻烦,并且在webpack3中mock数据的代码在正式环境并不能自动移除掉,导致正式环境有mock相对应的代码,但是在webpack4中,会使用 tree shaking插件会自动移除掉未使用到的代码的,想要了解tree shaking(https://www.cnblogs.com/tugenhua07…