[][src]Static p5_sys::global::createStringDict

pub static createStringDict: CreateStringDictInternalType

Creates a new instance of p5.StringDict using the key-value pair or the object you provide.

Examples

function setup() {
  let myDictionary = createStringDict('p5', 'js');
  print(myDictionary.hasKey('p5')); // logs true to console
 let anotherDictionary = createStringDict({ happy: 'coding' });
  print(anotherDictionary.hasKey('happy')); // logs true to console
}

Overloads

key

value


object object