JavaScript is a powerful programming language that has become increasingly popular over the past decade. It is used by developers…