Javascript internal example