Sitemap
wheresGwen

wheresGwen

JavaScript Methods

1 min readDec 19, 2016

//String Methods

  1. indexOf(); returns the index of (the position of) the first occurrence of a specified text in a string
  2. lastIndexOf(); returns the index of the last occurrence of a specified text in a string
  3. search(); method searches a string for a specified value and returns the position of the match

Get wheresGwen’s stories in your inbox

Join Medium for free to get updates from this writer.

//Math Methods

  1. Math.round(); Returns the value of x rounded to its nearest integer
  2. Math.floor(); returns the value of x rounded down to its nearest integer
  3. Math.min(); can be used to find the lowest value in a list of arguments
  4. Math.max(); can be used to find the highest value in a list of arguments
  5. Math.random(); returns a random number between 0 (inclusive), and 1 (exclusive)

--

--