lays the JS foundation.