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