Google Chrome - JavaScript version

后端 未结 6 1280
攒了一身酷
攒了一身酷 2020-12-08 03:57

Which version of JavaScript does Google Chrome support in relation to Mozilla Firefox? In other words, does Chrome support JavaScript 1.6, 1.7, or 1.8 which Firefox also su

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-08 04:43

    Here's a simple Javascript 1.6 feature Chrome (and V8 users, like node.js) won't run: for each … in

    for each (variable in object)
      statement
    

    As it is JS 1.5 (per J c's answer) is the only version Chrome claims to completely implement.

    In fact the Chrome team has mostly aimed for compatibility with Safari (most prominent Webkit user at the time), and refused features on those grounds.

提交回复
热议问题