wrote some comments about javascript different techniques