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

single

bookStrings 3/5

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

Accessing Character:

We can also access different characters from a string variable, and for that, we use the square brackets []. The syntaxes for accessing characters are str.charAt(pos) and variableName(pos) where pos is the position or index of the character that we want to access and variableName is the variable to be sliced. Let’s look at an example.

123
let str = 'JavaScript'; console.log(str[0] ); console.log( str.charAt(4));
copy
タスク

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

A string value, England, is stored in a variable named country. The task is to display the letter a of the variable England.

解答

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

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

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

セクション 3.  21
single

single

AIに質問する

expand

AIに質問する

ChatGPT

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

some-alt