added corresponding javascript examples