How can I get 4 letters from the left of string.

I use (left function) and (right function) In VBScript but What Can I use in JavaScript