I am using settimeout to run some code after a specific delay. However I want to add additional delay inside the settimeout block between two lines of code. I tried by using delay() but it is not working. How can I do this? Thanks in advance for your help?
My code:
setTimeout(() => {
this.messageService.add({
severity: 'success', summary: 'Yay',
detail: 'Successfully done'
});
console.log('here1');
delay(1000);
console.log('here2'); // run this after delay
}, 1500);