JSFiddle - React, Tailwind, and code Playground

by ChangJoo Park

JavaScript

const loadedData = {
	financial_status: false
}

console.log(loadedData.financial_status)
console.log(loadedData.hasOwnProperty('financial_status'))

if (loadedData.financial_status) {
	console.log("있고 값도 true")
}

if (loadedData.hasOwnProperty('financial_status')) {
	console.log("property만 있으면 됨")
}