Ad
  • Custom User Avatar

    thanks buddy

  • Custom User Avatar

    restore down your browser window

  • Default User Avatar

    is this a bad habit that if i can't solve a kata for 1 or 2 days than i unclock the solution and practice and learn from it afterwards?

  • Default User Avatar

    i have passed 26 tests but 6 tests are failing plz tell me what am i doing wrong

    this is my code of "Split an array" kata...

    function split(arr, prop) {

    //ceate an array

    let returnArray = [[],[]];

    //iterate through all the object in the array

    for(let i = 0; i < arr.length; i ++){
    //compare the prop

    if(arr[i][prop] && arr[i][prop] !== false && arr[i][prop] !== 0 && arr[i][prop] != "" && arr[i][prop] != null && arr[i][prop] !== undefined && arr[i][prop] != NaN){
    
      //if it is true than first object of the array is the given object 
    
      returnArray[0].push(arr[i]);
    
    } 
    
    if((arr[i][prop] === null && arr[i][prop] !== true && arr[i][prop] == "" && arr[i][prop] === undefined && arr[i][prop] == NaN) || !arr[i][prop] || arr[i][prop] === 0){
    
      //if it is false than second object of the array is the given object
    
      returnArray[1].push(arr[i]);
    
    }
    	
    }
    
    //return the array	
    return returnArray;
    

    }

  • Default User Avatar

    is it a bad habit that if I could not solve one problem for 1 or 2 days than i should click on unlock solution??

  • Default User Avatar

    help me bro I search about truthy and falsy after that i have managed to pass 26 test but still 6 tests are not passing i am very serious about this kata and i don't wanna look at the solution....... plz give me some hints

  • Default User Avatar

    I have passed 23 tests but 9 tests are failing i don't know why plzz help ......

    I have maken an array at the beginning with two arrays in it....

    if the object property is true these object will push to the 1st array of the main array and if the value of the object property is false

    the object will push onto the second array of the main array....tell me plzz what am I doing wrong here.

  • Default User Avatar

    same here bro......

  • Default User Avatar