Weird errors today on code that worked fine before

I am getting 'console.log(‘Message’) is not a function.

And the simple code below returns {} in stead of the expected values.

Is something up with the site?

async function getNewLeg(){
let flights = await wixData.query( ‘plannedflights’ ).descending( ‘leg’ ).find()
var records = flights.totalCount
console.log( 'Number of flights: ’ + records)
var newleg
if (records === 0 ) {
newleg = 10 ;
}
else {
let onlyitem = flights.items[ 0 ];
console.log( 'Current Record to Update: ’ + JSON.stringify(onlyitem))
var lastleg = onlyitem.leg;
newleg = lastleg + 10 ;
}
console.log = ( 'New Leg: ’ + newleg)
return newleg
}

Wrong syntax:

 console.log = ('New Leg: ' + newleg)//WRONG!!

Thanks for that. I think I may have just slashed that line without realizing the error. I am good now.