Toggle Active Class

JavaScript Easy 3 views
Back to Questions
Next Build HTML Table Rows Medium N

Problem Description

You have a button with id btn and a box with id box. When user clicks button, toggle class active on #box. Write the JavaScript code.

Input Format

No input.

Output Format

No output (DOM change).

Constraints

Assume HTML has #btn and #box elements.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Next