I want to check if a string is equal to another string and set a new string based on this condition.
private myFunction( myString: string ) {
if (myString != "someString") {
let path:string = "/*/POST/A";
}
else{
let path:string = "/*/POST/note/B";
}
(do something with path here)
Not sure the above is correct actually finding it pretty hard to find a decent example of this and completely new to typescript/ javascript.
let path = "/*/POST/note/B"; if (myString != "someString") { path = "/*/POST/A"; }?letvariable before any condition if u want to do something with your path