Update Tax Periods using Suitescripts

How to get and set tax period information values using suitescript.

Below snippet is really helpful for NetSuite script writers . They will understand how we can get tax period  information using the NetSuite record API’s3-Tax Periods