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

single

bookBoolean 3/4

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

The Boolean() Function:

The Boolean() function, in JavaScript, is used to return or convert a value to its Boolean value i.e., true or false.

Almost any value is evaluated as true if it has some sort of content, for example.

12
let name="paul"; console.log(Boolean(name));
copy

As you can see for the above variable, name we get the output as true because it had a string value. An empty string would have given a false output.

タスク

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

Use the Boolean method to check wheater the value given to the variable emptyString is true or false. Show the answer on the console.

解答

As you can see now for an empty string it gave the output as false.

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

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

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

セクション 3.  17
single

single

AIに質問する

expand

AIに質問する

ChatGPT

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

some-alt