Search Results


4 years ago by 1

I know we can use Math.min to do this .apply() on Math function makes it accept unlimited arguments Array.min = function( array ){ return Math.min.apply( Math, array ); }; How to do this with . . .

  • 2
  • 1
  • 844

4 years ago by 1

I have var arr = [     {        name: 'a',        value: 1    },    {  &nb . . .

  • 1
  • 0
  • 863

4 years ago by 1

Sample: myArray = [1, 2, 4, 10, 20,100] How to find second largest value without sorting the array or latering its contents? . . .

  • 3
  • 2
  • 17980

4 years ago by 1

I have to map an array of lowercase characters a to z to numbers 1 to 26. Example: [a,c,f] to [1,3,6] I tried  arr.map( function(x){ return (x-96); } )   However this returns an array o . . .

  • 0
  • 0
  • 1385