JS
challenger
Home
JavaScript Basics
strings
Get the Character at a Given Index
Get the Character at a Given Index
Given a string and a variable n, assign the character at index n of the string to a variable named charAtIndex. Use string indexing with the variable n.
Premium
reset
function greet(name) { return `Hello, ${name}!`; } console.log(greet("Erik"));
JavaScript
Run Code
Console