Difference between revisions of "ArrayFrequency"

From Catglobe Wiki
Jump to: navigation, search
 
Line 21: Line 21:
  
 
'''Examples'''
 
'''Examples'''
 
''{''
 
  
 
''array a = {1, 3, 1};''
 
''array a = {1, 3, 1};''
Line 28: Line 26:
 
''number c = arrayFrequency(a, 1);''
 
''number c = arrayFrequency(a, 1);''
  
''print(c);''
+
''print(c); //2''
 
 
''}''
 
  
 
'''Availability'''
 
'''Availability'''

Latest revision as of 04:38, 20 December 2011



arrayFrequency

Counts the number of times a number type value exists in an array .

Syntax

arrayFrequency(array, value)

Arguments

array: Is an array.

value: Is an expression with number type

Return type

number

Examples

array a = {1, 3, 1};

number c = arrayFrequency(a, 1);

print(c); //2

Availability

Version 4.8