There are many developers they use always a dollar in scripts but don't know why. They will always be unsure about whether to use the dollar sign or jQuery. Dollar Sign is nothing but it's an alias for JQuery then an alias for a function. You can write jQuery at the place of $.
Above and below syntax are same.
You may see code like this.
// Using the $ alias to select elements with
In this example, $ is used as a shorthand for the jQuery object, which allows you to select an element with the elementID and add the CSS class active to it.