Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Constant 3/3 | Data Types and Variables
Introduction to JavaScript
セクション 3.  11
single

single

bookConstant 3/3

メニューを表示するにはスワイプしてください

const Does Not Allow Hoisting

As discussed in the previous chapter, let does not allow hoisting i.e. we cannot use a variable before the declaration. Just like let we can not use hoisting with the const.it is only supported with var.

123
MYPLANET = 'earth'; console.log(MYPLANET); const MYPLANET;
copy
タスク

スワイプしてコーディングを開始

Rearrange the following code to display the value of SALARY on the console.

解答

Summary:

  • We can neither change the values of the const variables through reassignment nor we can redeclare them.
  • Value should be assigned to const variables at the time of declaration.

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 3.  11
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt