How the function hoisting is happen in javascript?

前端 未结 0 739
挽巷
挽巷 2020-12-03 16:56
sum(10, 20);
diff(10, 20);

function sum(x, y) {
  console.log(x + y)
  return x + y;
}

let diff = function(x, y) {
  console.log(x - y)
  return x - y;
}


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题