added apples javascript demonstration