module jk_ff_enable (
input CLK,
input EN,
input J,
input K,
output reg Q
);
// Write your code here
always @(posedge CLK) begin
case ({J, K})
2'b00: Q <= Q; // hold
2'b01: Q <= EN ? 1'b0 : Q; // reset
2'b10: Q <= EN ? 1'b1 : Q; // set
2'b11: Q <= EN ? ~Q : Q; // toggle
endcase
end
endmodule