Javascript initial setup