前端面试之手写代码篇-1.手写Object.create

38 阅读1分钟
function create(obj) {
  function F() {}
  F.prototype = obj
  return new F()
}