Split Number to parts

Hi,
I need help for JavaScript coding in html page:

National ID: 27906272200939

I want to split this number to many part.

first : first number (if 2 then 19 , if 3 then 20)
second : 79 (year of birth)
third : 06 (month of birth)
forth : 27 (day of birth)
fifth : 22 (state code) to make case function about name of state
sixth : 3 (if isodd number or not)

thanks

Hey! Is this a codecademy exercise? If so, can you give us the link?