Search Results


2 years ago by jsRant

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
  • 581

2 years ago by jsRant

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

  • 1
  • 0
  • 596

2 years ago by jsRant

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

  • 1
  • 0
  • 7506

2 years ago by mamdouh

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
  • 762