Packages

trait Array[T] extends scala.scalajs.js.Object with StObject with NumberDictionary[T]

Annotations
@JSType() @native()
Source
Array.scala
Linear Supertypes
NumberDictionary[T], StObject, scala.scalajs.js.Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Array
  2. NumberDictionary
  3. StObject
  4. Object
  5. Any
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): scala.Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): scala.Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. def concat(items: |[scala.scalajs.js.Array[T], T]*): scala.scalajs.js.Array[T]

    Combines two or more arrays.

    Combines two or more arrays. This method returns a new array without modifying any existing arrays.

    items

    Additional arrays and/or items to add to the end of the array.

  7. def copyWithin(target: Double, start: Double, end: Double): Array.this.type
  8. def copyWithin(target: Double, start: Double): Array.this.type

    Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

    Returns the this object after copying a section of the array identified by start and end to the same array starting at position target

    target

    If target is negative, it is treated as length+target where length is the length of the array.

    start

    If start is negative, it is treated as length+start. If end is negative, it is treated as length+end.

  9. def entries(): IterableIterator[Tuple2[Double, T]]

    Returns an iterable of key, value pairs for every entry in the array

  10. final def eq(arg0: AnyRef): scala.Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): scala.Boolean
    Definition Classes
    AnyRef → Any
  12. def every(predicate: Function3[T, Double, scala.scalajs.js.Array[T], Any], thisArg: Any): scala.Boolean
  13. def every(predicate: Function3[T, Double, scala.scalajs.js.Array[T], Any]): scala.Boolean

    Determines whether all the members of an array satisfy the specified test.

    Determines whether all the members of an array satisfy the specified test.

    predicate

    A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

  14. def every_S_T[S](predicate: Function3[T, Double, scala.scalajs.js.Array[T], scala.Boolean], thisArg: Any): scala.Boolean
    Annotations
    @JSName("every")
  15. def every_S_T[S](predicate: Function3[T, Double, scala.scalajs.js.Array[T], scala.Boolean]): scala.Boolean

    Determines whether all the members of an array satisfy the specified test.

    Determines whether all the members of an array satisfy the specified test.

    predicate

    A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.

    Annotations
    @JSName("every")
  16. def fill(value: T, start: Unit, end: Double): Array.this.type
  17. def fill(value: T, start: Double, end: Double): Array.this.type
  18. def fill(value: T, start: Double): Array.this.type
  19. def fill(value: T): Array.this.type

    Returns the this object after filling the section identified by start and end with value

    Returns the this object after filling the section identified by start and end with value

    value

    value to fill array section with

  20. def filter(predicate: Function3[T, Double, scala.scalajs.js.Array[T], Any], thisArg: Any): scala.scalajs.js.Array[T]
  21. def filter(predicate: Function3[T, Double, scala.scalajs.js.Array[T], Any]): scala.scalajs.js.Array[T]

    Returns the elements of an array that meet the condition specified in a callback function.

    Returns the elements of an array that meet the condition specified in a callback function.

    predicate

    A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.

  22. def filter_S_T[S](predicate: Function3[T, Double, scala.scalajs.js.Array[T], scala.Boolean], thisArg: Any): scala.scalajs.js.Array[S]
    Annotations
    @JSName("filter")
  23. def filter_S_T[S](predicate: Function3[T, Double, scala.scalajs.js.Array[T], scala.Boolean]): scala.scalajs.js.Array[S]

    Returns the elements of an array that meet the condition specified in a callback function.

    Returns the elements of an array that meet the condition specified in a callback function.

    predicate

    A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.

    Annotations
    @JSName("filter")
  24. def find[S](predicate: ThisFunction3[Unit, T, Double, scala.scalajs.js.Array[T], scala.Boolean], thisArg: Any): UndefOr[S]
  25. def find[S](predicate: ThisFunction3[Unit, T, Double, scala.scalajs.js.Array[T], scala.Boolean]): UndefOr[S]

    Returns the value of the first element in the array where predicate is true, and undefined otherwise.

    Returns the value of the first element in the array where predicate is true, and undefined otherwise.

    predicate

    find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.

  26. def find(predicate: Function3[T, Double, scala.scalajs.js.Array[T], Any], thisArg: Any): UndefOr[T]
  27. def find(predicate: Function3[T, Double, scala.scalajs.js.Array[T], Any]): UndefOr[T]
  28. def findIndex(predicate: Function3[T, Double, scala.scalajs.js.Array[T], Any], thisArg: Any): Double
  29. def findIndex(predicate: Function3[T, Double, scala.scalajs.js.Array[T], Any]): Double

    Returns the index of the first element in the array where predicate is true, and -1 otherwise.

    Returns the index of the first element in the array where predicate is true, and -1 otherwise.

    predicate

    find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, findIndex immediately returns that element index. Otherwise, findIndex returns -1.

  30. def flat[A, D](depth: D): scala.scalajs.js.Array[FlatArray[A, D]]
  31. def flat[A, D](): scala.scalajs.js.Array[FlatArray[A, D]]

    Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.

  32. def flatMap[U, This](callback: ThisFunction3[This, T, Double, scala.scalajs.js.Array[T], |[U, scala.scalajs.js.Array[U]]], thisArg: This): scala.scalajs.js.Array[U]
  33. def flatMap[U, This](callback: ThisFunction3[This, T, Double, scala.scalajs.js.Array[T], |[U, scala.scalajs.js.Array[U]]]): scala.scalajs.js.Array[U]

    Calls a defined callback function on each element of an array.

    Calls a defined callback function on each element of an array. Then, flattens the result into a new array. This is identical to a map followed by flat with depth 1.

    callback

    A function that accepts up to three arguments. The flatMap method calls the callback function one time for each element in the array.

  34. def forEach(callbackfn: Function3[T, Double, scala.scalajs.js.Array[T], Unit], thisArg: Any): Unit
  35. def forEach(callbackfn: Function3[T, Double, scala.scalajs.js.Array[T], Unit]): Unit

    Performs the specified action for each element in an array.

    Performs the specified action for each element in an array.

    callbackfn

    A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.

  36. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  37. def hasOwnProperty(v: scala.Predef.String): scala.Boolean
    Definition Classes
    Object
  38. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  39. def includes(searchElement: T, fromIndex: Double): scala.Boolean
  40. def includes(searchElement: T): scala.Boolean

    Determines whether an array includes a certain element, returning true or false as appropriate.

    Determines whether an array includes a certain element, returning true or false as appropriate.

    searchElement

    The element to search for.

  41. def indexOf(searchElement: T, fromIndex: Double): Double
  42. def indexOf(searchElement: T): Double

    Returns the index of the first occurrence of a value in an array, or -1 if it is not present.

    Returns the index of the first occurrence of a value in an array, or -1 if it is not present.

    searchElement

    The value to locate in the array.

  43. final def isInstanceOf[T0]: scala.Boolean
    Definition Classes
    Any
  44. def isPrototypeOf(v: scala.scalajs.js.Object): scala.Boolean
    Definition Classes
    Object
  45. val iterator: Function0[IterableIterator[T]]

    Iterator

    Iterator

    Annotations
    @JSName(js.Symbol.iterator)
  46. def join(separator: java.lang.String): java.lang.String
  47. def join(): java.lang.String

    Adds all the elements of an array into a string, separated by the specified separator string.

  48. def keys(): IterableIterator[Double]

    Returns an iterable of keys in the array

  49. def lastIndexOf(searchElement: T, fromIndex: Double): Double
  50. def lastIndexOf(searchElement: T): Double

    Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.

    Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.

    searchElement

    The value to locate in the array.

  51. val length: Double

    Gets or sets the length of the array.

    Gets or sets the length of the array. This is a number one higher than the highest index in the array.

  52. def map[U](callbackfn: Function3[T, Double, scala.scalajs.js.Array[T], U], thisArg: Any): scala.scalajs.js.Array[U]
  53. def map[U](callbackfn: Function3[T, Double, scala.scalajs.js.Array[T], U]): scala.scalajs.js.Array[U]

    Calls a defined callback function on each element of an array, and returns an array that contains the results.

    Calls a defined callback function on each element of an array, and returns an array that contains the results.

    callbackfn

    A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.

  54. final def ne(arg0: AnyRef): scala.Boolean
    Definition Classes
    AnyRef
  55. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  56. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  57. def pop(): UndefOr[T]

    Removes the last element from an array and returns it.

    Removes the last element from an array and returns it. If the array is empty, undefined is returned and the array is not modified.

  58. def propertyIsEnumerable(v: scala.Predef.String): scala.Boolean
    Definition Classes
    Object
  59. def push(items: T*): Double

    Appends new elements to the end of an array, and returns the new length of the array.

    Appends new elements to the end of an array, and returns the new length of the array.

    items

    New elements to add to the array.

  60. def reduce(callbackfn: Function4[T, T, Double, scala.scalajs.js.Array[T], T], initialValue: T): T
  61. def reduce(callbackfn: Function4[T, T, Double, scala.scalajs.js.Array[T], T]): T

    Calls the specified callback function for all the elements in an array.

    Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

    callbackfn

    A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

  62. def reduceRight(callbackfn: Function4[T, T, Double, scala.scalajs.js.Array[T], T], initialValue: T): T
  63. def reduceRight(callbackfn: Function4[T, T, Double, scala.scalajs.js.Array[T], T]): T

    Calls the specified callback function for all the elements in an array, in descending order.

    Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

    callbackfn

    A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

  64. def reduceRight_U_U[U](callbackfn: Function4[U, T, Double, scala.scalajs.js.Array[T], U], initialValue: U): U

    Calls the specified callback function for all the elements in an array, in descending order.

    Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

    callbackfn

    A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.

    initialValue

    If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

    Annotations
    @JSName("reduceRight")
  65. def reduce_U_U[U](callbackfn: Function4[U, T, Double, scala.scalajs.js.Array[T], U], initialValue: U): U

    Calls the specified callback function for all the elements in an array.

    Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.

    callbackfn

    A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.

    initialValue

    If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.

    Annotations
    @JSName("reduce")
  66. def reverse(): scala.scalajs.js.Array[T]

    Reverses the elements in an array in place.

    Reverses the elements in an array in place. This method mutates the array and returns a reference to the same array.

  67. def shift(): UndefOr[T]

    Removes the first element from an array and returns it.

    Removes the first element from an array and returns it. If the array is empty, undefined is returned and the array is not modified.

  68. def slice(start: Unit, end: Double): scala.scalajs.js.Array[T]
  69. def slice(start: Double, end: Double): scala.scalajs.js.Array[T]
  70. def slice(start: Double): scala.scalajs.js.Array[T]
  71. def slice(): scala.scalajs.js.Array[T]

    Returns a copy of a section of an array.

    Returns a copy of a section of an array. For both start and end, a negative index can be used to indicate an offset from the end of the array. For example, -2 refers to the second to last element of the array.

  72. def some(predicate: Function3[T, Double, scala.scalajs.js.Array[T], Any], thisArg: Any): scala.Boolean
  73. def some(predicate: Function3[T, Double, scala.scalajs.js.Array[T], Any]): scala.Boolean

    Determines whether the specified callback function returns true for any element of an array.

    Determines whether the specified callback function returns true for any element of an array.

    predicate

    A function that accepts up to three arguments. The some method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.

  74. def sort(compareFn: Function2[T, T, Double]): Array.this.type
  75. def sort(): Array.this.type

    Sorts an array in place.

    Sorts an array in place. This method mutates the array and returns a reference to the same array.

  76. def splice(start: Double, deleteCount: Double, items: T*): scala.scalajs.js.Array[T]

    Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

    Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

    start

    The zero-based location in the array from which to start removing elements.

    deleteCount

    The number of elements to remove.

    items

    Elements to insert into the array in place of the deleted elements.

  77. def splice(start: Double, deleteCount: Double): scala.scalajs.js.Array[T]
  78. def splice(start: Double): scala.scalajs.js.Array[T]

    Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

    Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.

    start

    The zero-based location in the array from which to start removing elements.

  79. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  80. def toLocaleString(): scala.Predef.String
    Definition Classes
    Object
  81. def toString(): java.lang.String
    Definition Classes
    AnyRef → Any
  82. val unscopables: Function0[CopyWithin]

    Returns an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.

    Returns an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.

    Annotations
    @JSName(js.Symbol.unscopables)
  83. def unshift(items: T*): Double

    Inserts new elements at the start of an array, and returns the new length of the array.

    Inserts new elements at the start of an array, and returns the new length of the array.

    items

    Elements to insert at the start of the array.

  84. def valueOf(): Any
    Definition Classes
    Object
  85. def values(): IterableIterator[T]

    Returns an iterable of values in the array

  86. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  87. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  88. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from NumberDictionary[T]

Inherited from StObject

Inherited from scala.scalajs.js.Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped