Using Peek in SmartMS

Top 

Example code : Using Peek in SmartMS

var

  fruits : array of String = ["Banana", "Orange", "Apple", "Mango", "Banana", "Abacate", "Apple"];

begin

  WriteLn( fruits.Peek() );

Apple

---------

 

JS output:

      var fruits = [];

      var fruits = ["Banana","Orange","Apple","Mango","Banana","Abacate","Apple"].slice();

      WriteLn($Peek(fruits,""));