hi i want to show console.log this situation..
if lasdId value is {}
i want to show console.log("hello");
but it doesn't work... how can i fix my code??
this is my code
router.post('/related', async (req, res, next) => {
try {
// const lastId = parseInt(req.query.lastId, 10);
const lastId = req.body;
console.log("lastId:::::::::::::::::::::::",lastId);
if (lastId === {}) {
console.log("hello!");
// where.id = { [Op.in]: followings.map((v) => v.id).filter(value => value < lastId)}
// console.log("where:::::::::::::::::",where);
}
i think the reason why console.log doesn't show up is that lastID type is uncorrect... then how can i fix type?