JavaScript Methods
1 min readDec 19, 2016
//String Methods
- indexOf(); returns the index of (the position of) the first occurrence of a specified text in a string
- lastIndexOf(); returns the index of the last occurrence of a specified text in a string
- 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
- Math.round(); Returns the value of x rounded to its nearest integer
- Math.floor(); returns the value of x rounded down to its nearest integer
- Math.min(); can be used to find the lowest value in a list of arguments
- Math.max(); can be used to find the highest value in a list of arguments
- Math.random(); returns a random number between 0 (inclusive), and 1 (exclusive)





