As Barmar said, the use strict is optional, but if you had to place it somewhere the best place I would say you should put it is

    $(function(){
        "use strict"
        $('.nav-toggle').on('click',function(){
        
            $('.main-nav').toggleClass('open');
        });
    });
This is where you have to put it whether you use Jquery or Javascript