« first day (1855 days earlier)      last day (2262 days later) » 

 
2 hours later…
Wax
Wax
03:23
`it('should call onFooterClick on click', async() => {
let isOpening = true;

spyOn(component, 'onFooterClick').and.callThrough();

let button = fixture.debugElement.nativeElement.querySelector('button'); // this is what i use on static dom elements

button.click();

fixture.whenStable().then(() => {
expect(component.onHeaderClick).toHaveBeenCalled();
});
});`
1 message moved from JavaScript
 
2 hours later…
 
7 hours later…
12:49
@Queen ok
16:31
function quickSort(arr) {
// Complete this function
var left = [], right = [], equal = [];
var p = arr[0];
for(i = 1;i< arr.length ; i++)
{
if(arr[i] <= p)
{
left = left.push(arr[i]);
}
else if(arr[i] > p)
{
right = right.push(arr[i]);
}

}
return left.concat(equal).concat(right);
}

console.log(quickSort([2,1,3,1,2]));
1 message moved from JavaScript
Hi
anyone here?
hello?
In the above program, I am getting:
TypeError: left.push is not a function
at quickSort:9:14
at eval:20:13
Where is the error? I couldnt able to find!
@CapricaSix hiii?
@rlemon
can you help me please?
@anu
anyone?
I looked the similar questions but didn't get the same issue!
@hilli_micha
16:49
@Ac3_DeXt3R It's really bad form to ping random people dude, you're not gonna make anyone want to help you by doing that.
sorry
I am using for 1st time
extremely sorry
But I'll give you this bit of advice, in the Javascript room, the bot that replied to you (CapricaSix) told you what to do. Don't post unformatted code in there.
ohh...gotcha
function quickSort(arr) {
// Complete this function
var left = [], right = [], equal = [];
var p = arr[0];
for(i = 1;i< arr.length ; i++)
{
if( arr[i] <= p )
{
left = left.push(arr[i]);
}
else if(arr[i] > p)
{
right = right.push(arr[i]);
}

}
return left.concat(equal).concat(right);
}

console.log(quickSort([2,1,3,1,2]));
1 message moved from JavaScript
function quickSort(arr) {
    // Complete this function
  var left = [], right = [], equal = [];
  var p = arr[0];
  for(i = 1;i< arr.length ; i++)
  {
    if( arr[i] <= p )
    {
      left = left.push(arr[i]);
    }
    else if(arr[i] > p)
    {
      right = right.push(arr[i]);
    }

  }
	return left.concat(equal).concat(right);
}

console.log(quickSort([2,1,3,1,2]));
hey guys I want to convert
<ul>
<li>name</li>
<li>alisha</li>
</ul>
<ul>
<li>name</li>
<li>alisha</li>
</ul>

into
{
element:'ul',
child:[
{
element:'li',
child:[
{
element:'text',
child:['name']
},
{
element:'text',
child:['alisha']
}
]
}
]
}
how can i do this is there any converter for this
1 message moved from JavaScript
1 message moved from JavaScript
18:21
1 message moved from JavaScript

« first day (1855 days earlier)      last day (2262 days later) »