extend js example