I would like to include a variable and fix the quotes
Remove the BA and leave the variable te
Hey
Do you want to replace the BA from string
Please elaborate it
Thanks
instead of BA I want to add a variable
and correct the quotes
Hey,
You can use
StrVar.Replace(“BA”, te)
Where
StrVar you are storing the complete string.
Thanks
That is absolutely not how you do this.
@Camilo_Cardoso here is the correct syntax:
“var teste =document.querySelector('[ng-reflect-value=”“” + yourVariable + “”“]')”
What may not be obvious here is the use of three double quotes in a row. This is because you are using double quotes to contain your string, but you need double quotes as part of the value also. For that, you escape by typing the double quotes twice.
So if you want your variable to have the value:
The word “Name” is four letters.
Then you’d have to do:
myVar = “The word ““Name”” is four letters.”
If it just so happens that your string ends after “Name” then you end up with three double quotes because the last one is ending your string that’s being assigned.
myVar = “The word ““Name”””
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.