But now there is a better way of doing it. We can hide the optionvalue directly from the optionset/Choice editor in the make.powerapps.com. With this way the value will not show on the UI using configuration without writing Javascript.
Follow below steps
Step 1: Navigate to https://make.powerapp.com
Step 2: On the left navigation page click on Tables
Step 3: Search and open desired table by clicking on it. (For Example: Account)
Step 4: On the schema section click on "Columns"
Step 5: On the list of columns search desired column with Data Type = "Choice".(For Example : Industry)
Step 6: Now Edit the Column by clicking on the field name which opens a popup
Step 7: Navigate to Choice section and select the value (For Example: Accounting) which you want to hide by clicking on "Additional Properties".
Step 8: This would open a popup in that there is a checkbox called "Hidden". Enable that checkbox.
Step 9: Click on Save.
Step 10: Publish the table to reflect the changes.
Step 11: Navigate back to Application and check the value which we are hiding in the optionset field on the form it will not longer be visible.