JS
challenger
Home
JavaScript Practice
JavaScript fundamentals
Remove last n characters of string
Remove last n characters of string
Write a function that takes a string (a) as an argument. Remove the last 3 characters of a. Return the result.
Premium
reset
function greet(name) { return `Hello, ${name}!`; } console.log(greet("Erik"));
JavaScript
Run Code
Console