In an electronic device according to the present invention, a sensor unit for measuring an attribute of a user's exhalation; At least one dye whose color changes according to the kind and concentration of the gas component included in the user's exhalation; And controlling the output of the color change information of the dye when the property of the measured expiration is a level effective for judging the color change of the dye. Accordingly, the user can diagnose the disease by a visual method using a dye whose color changes according to the kind and concentration of the gas component included in the user's exhalation.본 발명에 따른 전자장치에 있어, 사용자의 날숨의 속성을 측정하는 센서부와; 사용자의 날숨에 포함된 가스 성분의 종류 및 농도에 따라 색상이 변화되는 적어도 하나의 염료가 마련되는 진단부와; 측정된 날숨의 속성이 염료의 색상 변화를 판단하기에 유효한 수준인 경우, 염료의 색상변화정보를 출력하도록 제어하는 제어부를 포함한다. 이에 따라, 사용자의 날숨에 포함된 가스 성분의 종류 및 농도에 따라 색상이 변화되는 염료를 이용하여 사용자가 시각적인 방법으로 질병을 진단할 수 있는 효과가 있다.