Remove last n characters of string

// Write a function that takes a string (a) as argument
// Remove the last 3 characters of a
// Return the result
function
myFunction
(
a
)
{

return
}
Test Cases:
myFunction('abcdefg')
Expected
'abcd'
myFunction('1234')
Expected
'1'
myFunction('fgedcba')
Expected
'fged'