Extract first half of string

// Write a function that takes a string (a) as argument
// Extract the first half a
// Return the result
function
myFunction
(
a
)
{

return
}
Test Cases:
myFunction('abcdefgh')
Expected
'abcd'
myFunction('1234')
Expected
'12'
myFunction('gedcba')
Expected
'ged'