function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sf sharathsf sharath 

unexpected token coming as error pls solve the error

list<string> colors = new list<string>{'Black'};

 

  colors.add('Pink');

  colors.add('Yellow');

  system.debug('color in 1 index :'+colors.get(1));

  colors.add('Green');

  colors.set(1,'Blue');

system.debug('color in 1 index :'+colors.get(1));

system.debug('color size :'+colors.size());

  colors.clear();

system.debug('color size after clear :'+colors.size());

 

Navatar_DbSupNavatar_DbSup

Hi,

 

I have tried this code in system debug and its working fine.

 

 

 Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.