Oct 23, 2001 #1 Candyb Technical User Oct 2, 2001 12 CA Hi, I was just wondering how you would write the following? I have a var id = 1; What is the syntax to insert this variable into a string? if it is possible? Or a string of single quotes? Thanks, Candy
Hi, I was just wondering how you would write the following? I have a var id = 1; What is the syntax to insert this variable into a string? if it is possible? Or a string of single quotes? Thanks, Candy
Oct 23, 2001 #2 ToddWW Programmer Mar 25, 2001 1,073 US Here you go. Code: var id = 1 var id_string = id.toString() Hope this helps.. ToddWW Upvote 0 Downvote
Oct 23, 2001 #3 mackey333 Technical User May 10, 2001 563 US or: var txt = "blah blah blah" + id or: var txt = "blah blah"; var id = 1; id.toString(); var newString = txt.concat(id) -Greg :-Q Upvote 0 Downvote
or: var txt = "blah blah blah" + id or: var txt = "blah blah"; var id = 1; id.toString(); var newString = txt.concat(id) -Greg :-Q