Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //first we define our variables
- var a = "programmer"
- var b = "humor"
- //then put them both in a
- var a = a + "_" + b
- //then assign the part before the separator to b
- var b = a.split("_")[0]
- //lastly assign tje part after the separator to a
- var a = a.split("_")[1]
- //then we just output them to the document
- document.write("Var A: " + a + "<br> Var B: " + b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement