Пример #1
0
		/// <summary>
		/// <para>
		/// callbackfn should be a function that takes four arguments. reduceRight calls the callback, as a function, once for each element present in the array, in descending order.
		/// </para>
		/// <para>
		/// callbackfn is called with four arguments: the previousValue (or value from the previous call to callbackfn), the currentValue (value of the current element), the currentIndex, and the object being traversed. The first time the function is called, the previousValue and currentValue can be one of two values. If an initialValue was provided in the call to reduceRight, then previousValue will be equal to initialValue and currentValue will be equal to the last value in the array. If no initialValue was provided, then previousValue will be equal to the last value in the array and currentValue will be equal to the second-to-last value. It is a TypeError if the array contains no elements and initialValue is not provided.
		/// </para>
		/// </summary>
		/// <remarks>
		/// <para>
		/// reduceRight does not directly mutate the object on which it is called but the object may be mutated by the calls to callbackfn.
		/// </para>
		/// <para>
		/// The range of elements processed by reduceRight is set before the first call to callbackfn. Elements that are appended to the array after the call to reduceRight begins will not be visited by callbackfn. If existing elements of the array are changed by callbackfn, their value as passed to callbackfn will be the value at the time reduceRight visits them; elements that are deleted after the call to filter begins and before being visited are not visited.
		/// </para>
		/// </remarks>
		/// <param name="callback"></param>
		/// <param name="initialValue"></param>
		/// <returns></returns>
		public extern object ReduceRight(ArrayReduceFn callback, object initialValue);
Пример #2
0
		/// <summary>
		/// <para>
		/// callbackfn should be a function that takes four arguments. reduceRight calls the callback, as a function, once for each element present in the array, in descending order.
		/// </para>
		/// <para>
		/// callbackfn is called with four arguments: the previousValue (or value from the previous call to callbackfn), the currentValue (value of the current element), the currentIndex, and the object being traversed. The first time the function is called, the previousValue and currentValue can be one of two values. If an initialValue was provided in the call to reduceRight, then previousValue will be equal to initialValue and currentValue will be equal to the last value in the array. If no initialValue was provided, then previousValue will be equal to the last value in the array and currentValue will be equal to the second-to-last value. It is a TypeError if the array contains no elements and initialValue is not provided.
		/// </para>
		/// </summary>
		/// <remarks>
		/// <para>
		/// reduceRight does not directly mutate the object on which it is called but the object may be mutated by the calls to callbackfn.
		/// </para>
		/// <para>
		/// The range of elements processed by reduceRight is set before the first call to callbackfn. Elements that are appended to the array after the call to reduceRight begins will not be visited by callbackfn. If existing elements of the array are changed by callbackfn, their value as passed to callbackfn will be the value at the time reduceRight visits them; elements that are deleted after the call to filter begins and before being visited are not visited.
		/// </para>
		/// </remarks>
		/// <param name="callback"></param>
		/// <returns></returns>
		public extern object ReduceRight(ArrayReduceFn callback);