What Is the Difference Between $ and $$

What Is the Difference Between $ and $$

What's the difference between $ and $$? It seems like they both return a list of nodes, but filter isn't applicable to $$ and throws an exception.
What are the other differences?

3

1 Answer

$ is a variable name. $$ is a different variable name.

jQuery assigns a function to the $ variable.

jQuery does nothing (by default) to the $$ variable (so it will be undefined unless something else assigns a value to it).

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Elena Rostova
Author

Elena Rostova

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.