I have some prewritten code which includes an object method being called in the following way
job!.method();
What is the use of ! here? When I remove it, the code doesn't run as expected.
I tried searching for this syntax but couldn't find any answers.
The full code where the object job is accessed is
private jobs: Array<Job> = []; //Before the constructor
const job = this.jobs.shift(); //Inside a method
job!.exec();