怎么问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
标签云
-
Binance OKx 虚拟货币交易所 USDT 模因币 BRC20 TRC20 Staking 虚拟货币 ARB Sol gamefi 小狐狸钱包 DAO web3.0 流动性挖矿 什么是DeFi ICO 什么是NFT 什么是稳定币 SHIB 虚拟货币钱包 加密货币交易所 加密货币 什么是加密货币 GST 资金费率 MAX 区块链技术 区块链投资 区块链是什么 Coinw BingX Gate.io Bitfinex MEXC BITGET BitMEX Kucoin pionex Bybit BitMart KYC 网格交易 LTC Litecoin PI 什么是狗狗币 LUNA USDC