Offline learning lab. No real device scans or network requests.
The time of a report is evidence of age, not a guarantee of current position.
function reportAge(now, seen) {
if (!Number.isFinite(now) || !Number.isFinite(seen) || seen > now)
throw Error("Invalid time");
return {minutes: now - seen,
note: now - seen > 10 ? "Old report" : "Recent report"};
}Example: reportAge(35,12)
The ten-minute threshold is invented for this lesson.
Choose the newest eligible fictional observation. Real systems also apply privacy controls, cryptography and aggregation.
function newestReport(reports) {
return reports.filter(r => r.eligible && Number.isFinite(r.time))
.reduce((best,r) => !best || r.time > best.time ? r : best, null);
}Example: newestReport([{place:"Library",time:8,eligible:true},{place:"Station",time:14,eligible:true}])
What happens if no eligible reports exist?
A toy decision tree prioritizes safety rather than guessing who owns a tracker. It cannot detect real trackers.
function safeAction(danger, alert) {
if (danger) return "Go to safety; contact trusted adult or police";
if (alert) return "Save alert; use official guidance";
return "No alert is not proof of safety";
}Example: safeAction(false,true)
Try all four boolean combinations. Explain why the result cannot identify an owner.