+ 1
how to use single <i></i> element and toggle between two font awesome icons using vanilla JavaScript .
i want to toggle .fa-times and back to .fa-bars using ternary operator.[don't use external counter variable eg: let count=0]
1 Answer
+ 3
Like this ?
https://code.sololearn.com/W42W7T14fKvk/?ref=app
It isn't using ternary operator though . If you want that i will edit my code later !