+ 1
Spaces or commas?
Hello. In this lesson, Solo said we should use spaces not commas. In previous lesson, they said use commas bot spaces. Different lessons though. But how does one know which method or action to use commas or spaces in jquery and JavaScript https://www.sololearn.com/learn/jQuery/2796/
1 Resposta
+ 2
Can you link to the lesson?
Spaces in a selector indicate the latter is a descendant of the former element. It also seperate different CSS properties.
These selectors/values are passed as strings, as it is not of JS syntax (CSS actually) and needs to be parsed by JQuery.
The comma is used for seperating parameters or arguments, chaining variable definitions, and many more.