怎么问Chatgpt获得清晰回答-JS argument与parameter的分别
2023-04-28分类:人工智能 阅读()
怎么问Chatgpt获得清晰回答?回想日常的思考模式与记录笔记模式,指引chatgpt用同等方式;回答切换语言,使用自己能理解的方式而不一定要用习惯的语言;用例子来加强印象跟延伸解释;一直问到理解为止
怎么问Chatgpt获得清晰回答
- 回想日常的思考模式与记录笔记模式,指引chatgpt用同等方式回答
- 切换语言,使用自己能理解的方式而不一定要用习惯的语言
- 用例子来加强印象跟延伸解释
- 一直问到理解为止
例子:我一直不是很能理解argument vs parameter的分别,还有不少词汇看到文章经常使用但也不太理解,所以询问Chatgpt
第一次问完之后,Chatgpt以段落的方式给我一段解释,看完还是很懵,毕竟本来就不懂,不懂的东西用大段文字连看都不想看。
第二次尝试让它用中文解释,名词根本看不懂。
第三次用我习惯的point form配上例子,终于看懂了。
Here are some points to explain the difference between parameters and arguments in programming, with examples: Parameters: - Parameters are variables declared in a function definition. They act as placeholders that will be assigned values when the function is called. - They are enclosed in parentheses after the function name. - Parameters are used to define the function signature. For example, in the following function definition, "x" and "y" are parameters: function addNumbers(x, y) { return x + y; } Arguments: - Arguments are the actual values passed to a function when it is called. - They are passed to the function as inputs when it is invoked. Arguments are assigned to the corresponding parameters in the function definition. - Arguments are enclosed in parentheses after the function name when it is called. For example, in the following function call, "2" and "3" are arguments: addNumbers(2, 3); In this case, "2" will be assigned to the "x" parameter, and "3" will be assigned to the "y" parameter. The function will then return the sum of the two arguments, which is 5. So, in summary, parameters are variables declared in a function definition, while arguments are the values passed to a function when it is called. The parameters act as placeholders for the arguments, which are assigned to them when the function is invoked.
Tags: ChatGPT
标签云
-
CoinMarketCap 炒币 币圈 Rust MOVE IFO filecoin GRT near AAVE DAI Ethereum TVL 加密钱包 ERC20 区块链应用 零知识证明 区块链公司 什么是DeFi BOBA 区块链游戏 DePIN 比特币是什么 加密货币钱包 加密货币 FIL 比特币ETF 比特币挖矿 比特币减半 虚拟货币 比特币交易 加密货币投资 比特币投资 Coinw 数字货币交易所 区块链交易所 区块链开发 矿机 BitMEX OKCoin 比特币钱包 狗狗币怎么买 以太币 虚拟货币交易所 加密货币诈骗 中本聪 加密货币挖矿 BitoPro 什么是区块链 SHIB