# 摘录之GPT答询关于JS（中英，纯分享）

**URL:** <https://forum.freemdict.com/t/topic/38431>\
**Category:** 软件经验交流展望\
**Created:** [2025 年4 月 25 日 15:15 UTC](https://forum.freemdict.com/t/topic/38431 "2025-04-25T15:15:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HbuTbc](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/hbutbc/32/2716_2.png) [@HbuTbc](https://forum.freemdict.com/u/HbuTbc)\
**Post date:** [2025 年4 月 25 日 15:15 UTC](https://forum.freemdict.com/t/topic/38431/1 "2025-04-25T15:15:08Z")

</div>

**问题**

> **含大量生成式AI内容**
>
> GPT-4o mini(free by sign in):
> 
> 1. The versions of Qt (primarily in GoldenDict)
> 2. Provide details about the relationship between Qt 5, Qt 6, and ES5, ES6 of ECMAScript (primarily in GoldenDict).
> 
> GPT-4o mini（通过登录免费提供）：
> 
> 1. Qt的版本（主要在GoldenDict中）
> 2. 提供关于 Qt 5、Qt 6 与 ECMAScript 的 ES5 和 ES6 之间关系的详细信息（主要在 GoldenDict 中）。
> 
> **摘录**
> 
> Differences in JavaScript Support (ES5/ES6):
> 
> - ES5 (ECMAScript 5) is the version of JavaScript that was widely used before the introduction of ES6. It includes features such as strict mode, getters/setters, and improved error handling, but lacks the modern features available in ES6.
> - ES6 (ECMAScript 6) is a significant update to JavaScript, which includes improvements like classes, modules, enhanced object literals, destructuring, promises, and other features that make the language more powerful and easier to work with.
> - Qt’s Role: Qt 5 typically supports ES5 features because it uses an older version of the Chromium engine. However, Qt 6 is more likely to fully support ES6 features, aligning with modern web standards and ensuring better compatibility with newer web technologies.
> 
> JavaScript 支持的差异（ES5/ES6）：
> 
> - ES5（ECMAScript 5）是 JavaScript 在引入 ES6 之前的版本。它包括严格模式、getter/setter 和改进的错误处理等功能，但缺乏 ES6 中的现代特性。
> - ES6（ECMAScript 6）是对 JavaScript 的一次重大更新，新增了类、模块、增强的对象字面量、解构赋值、Promise 等特性，使语言更强大、易于使用。
> - Qt 的作用：Qt 5 通常支持 ES5 特性，因为它使用的是较旧版本的 Chromium 引擎。然而，Qt 6 更有可能完全支持 ES6 特性，与现代 Web 标准兼容，确保更好的与新兴 Web 技术的兼容性。

**补充**

> **含大量生成式AI内容**
>
> ```auto
> Qt 5 ≈ ES5 (classic, stable, widespread)
> Qt 6 ≈ ES6–ES11+ (modern, modular, future-ready)
> 
> 最新版是JavaScript ES15 (2024) ，但以下GPT的回复是错的！？
> 
> ECMAScript Version | Year | Key Features
> ES6 (ES2015) | 2015 | let, const, arrow functions, classes, modules
> ES7 (2016) | 2016 | Array.prototype.includes, ** operator
> ES8 (2017) | 2017 | async/await, Object features
> ES9 (2018) | 2018 | Promise.finally, rest/spread for objects
> ES10 (2019) | 2019 | flatMap, trimStart, Object.fromEntries
> ES11 (2020) | 2020 | Optional chaining (?.), nullish coalescing (??)
> ES12–ES2024 | 2021–now | Even more refinements, #private fields, top-level await, etc.
> 
> ```
> 
> * * *

**随手小记**  
~~新作在含2024后，若遇到折叠失效、显示内容空白、发音异常等等，猜测是无法正常加载ES6-？的代码在软件上。~~  
参阅：

> [@last\_idol](#):
>
> 版本差异来自 QtWebkit 和 QtWebEngine

## **[例子（虽然软件为Mdict）：topic/22925](https://forum.freemdict.com/t/topic/22925) _因完整版 js使用到ES6语法,Mdict无法正常加载, 有能力可以帮忙转下。_**

1. 建议金典Qt 6+于衍生版（中国，又名goldendict-ng）。
2. 个人因素而仍使用金典Qt 5.12.3于原版（俄罗斯）。  
 ![该图于该部分内容在金典文件夹里](https://forumcdn.freemdict.com/uploads/default/original/3X/1/9/1902a0f25b836636d0fb5e89784468d5ba116bbc.jpeg)

---

<div class="post-metadata">

**Author:** ![last\_idol](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/last_idol/32/2205_2.png) [@last\_idol](https://forum.freemdict.com/u/last_idol)\
**Post date:** [2025 年4 月 25 日 16:11 UTC](https://forum.freemdict.com/t/topic/38431/2 "2025-04-25T16:11:43Z")

</div>

Qt 和 JavaScript 的版本没有直接关系，版本差异来自 QtWebkit 和 QtWebEngine。GoldenDict 原版用的 QtWebkit，只支持到 ES5；NG 版用的 QtWebEngine 构建在 Chromium 之上，所以对 JavaScript 的新版本的特性支持更好。
