Javascript Get Last Element Of Array Without Removing