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.
JavaScript
Console