createNumberDict

Static createNumberDict 

Source
pub static createNumberDict: CreateNumberDictInternalType
Expand description

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

Examples

 function setup() {
   let myDictionary = createNumberDict(100, 42);
   print(myDictionary.hasKey(100)); // logs true to console
  let anotherDictionary = createNumberDict({ 200: 84 });
   print(anotherDictionary.hasKey(200)); // logs true to console
 }

Overloads

key

value


object object