變數常數命名


Posted by mijouhsieh on 2023-04-14

若儲存的資料不會變更,宣告常數名稱 字首大寫---以表示此特性。

const Symbols = [
  'https://assets-lighthouse.alphacamp.co/uploads/image/file/17989/__.png', // 黑桃
  'https://assets-lighthouse.alphacamp.co/uploads/image/file/17992/heart.png', // 愛心
  'https://assets-lighthouse.alphacamp.co/uploads/image/file/17991/diamonds.png', // 方塊
  'https://assets-lighthouse.alphacamp.co/uploads/image/file/17988/__.png' // 梅花
]

#宣告變數 #變數常數命名







Related Posts

[ week14 ] 部署 AWS EC2 linux + LAMP Web Server +Sequel Pro +gandi

[ week14 ] 部署 AWS EC2 linux + LAMP Web Server +Sequel Pro +gandi

工程師養成日記:從自學到進入職場,非本科系也能寫扣領薪水!

工程師養成日記:從自學到進入職場,非本科系也能寫扣領薪水!

[Power BI] 讀書會 #5 Analysis Services 概念(4)

[Power BI] 讀書會 #5 Analysis Services 概念(4)


Comments