foreach is not a function typescript code example
Example 1: hasOwnProperty is not a function
// Calls "hasOwnProperty" on queryData, even if queryData has
// no prototype:
console.log(Object.hasOwnProperty.bind(queryData)('session'));
Example 2: react this.state.selectedDays.toLocaleDateString is not a function
function formatTime(time, prefix = "") {
return typeof time == "object" ? prefix + time.toLocaleDateString() : "";
}