const flightName = {
airline: 'luftansa',
itaCode: 'LH',
book: function(flightname, text) {
console.log(`This is ${flightname},${text}`);
}
}
flightName.book('indigo', 'johnny');
let book1 = flightName.book;
book1.call('Johnny', 'King');
Output:
This is indigo,johnny
This is King,undefined
callis not the first argument of the called function. Read the documentation.