How do I make the text bold when the button is clicked?

  • 0
    How to make a script so that when the button is clicked, the text inside the button becomes bold?
    JavaScript Anonymous, Jun 4, 2020

  • 2 Answers
  • 0
    btn = document.querySelector(".btn");
    btn.addEventListener('click', function(){

    font-weight: bold;

  • 0
    Hang up the click event, then add a new class to this class or idi that will have the font-weight bold
    Ava Patel

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!