Complete Javascript part of third section