++ 运算符

来源:互联网 发布:unity3d 场景资源 编辑:程序博客网 时间:2024/06/05 03:27
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>DEMO - Lik</title></head><body><script>var total = 10;console.log(total++); // 10var total2 = 10;console.log(++total2); // 11</script></body></html>

  ++ 在后,先赋值再 ++

  ++ 在前,先++再赋值

原创粉丝点击