Home > front end >  About the location object code in the interpretation of the meaning
About the location object code in the interpretation of the meaning

Time:03-02

Reading in the textbook wrote this is to remove the question mark in the beginning, but I didn't understand the logical meaning of the string of code, which master can help you explain it, thank you very much



CodePudding user response:

This is 3 the unary, equivalent to
 if (location. Search. Length & gt; 0 {
Qs=location. The search. The substring (1);//interception location. The search after the first position of the string is assigned to qs
} else {
Qs="";
}
  • Related