Hide show command button using JavaScript in power apps

use below code in Enable Rule.