Position

Description

Search position substring of string

Inputs

  • MyString
  • FindMe

Outputs

  • Position FindMe of MyString

Algorithm

/**
 * Position: Search position substring of string
 *
 * @param x1 MyString
 * @param x2 FindMe
 * @return {Array}
 */
function neuron523(x1, x2)
{
return [x1.toString().indexOf(x2.toString())];
}

console.log(neuron523(229, 990));

Create your family tree for free