Hi All,
i have 2 array
allDates =[ 1 , 2 , 3 … 30]; - (generate from a dataset)
dates = [ 1, 4, 5] - (this i generated from a query)
$w ( ‘#repeater4’ ). forEachItem (( $item , itemData , index ) => {
checkLogHistory ( userEmail , 4 ) - generate the “dates” array
. then ( res => {
let date = $item ( ‘#text3’ ). text
console . log ( date + " : " + res )
checkDateToHistory ( res,date )
})
})
async function checkDateToHistory ( allDates,date ) {
const result = allDates . some ( item => date . includes ( item ))
console . log ( date + " : " + result )
return result
the issue now… based on the console log… even 10 or 24 will be shown as true…
not sure where did I get it wrong… anyone pls help to show me the direction?