createStringDict

Static createStringDict 

Source
pub static createStringDict: CreateStringDictInternalType
Expand description

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