Javascript detailed tutorial and complete case