Strings

Bracket Access

Bracket Access

Bracket notation reads one character at a known position. It is useful when a string has a predictable structure.

Your task: From the provided course code, create languageInitial for the first character and separator for the hyphen. Log both values.

Free with a JS Exercises account

Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.

By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.

Bracket Access

Bracket notation reads one character at a known position. It is useful when a string has a predictable structure.

Your task: From the provided course code, create languageInitial for the first character and separator for the hyphen. Log both values.

Free with a JS Exercises account

Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.

By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.

Console

Run code to see output.