Eduardo Jonathan Munoz6,672 Points
i almost had it right !!
all of it works execept i cant get it to display on the browser by combining all the strings , is the way im doing it is i ask the questions and store the answers in comand.log but i want to display all of the answers and strings with document.write() is there a way to do so ?? here is my code : var story= prompt("what is your name ?"); console.log(story); var want=prompt("and you wanna become?"); console.log(want); var mission=prompt("and your mission is ?") console.log(mission); alert("you have compleated the story"); Document.write("our hero+story+will become+want+and his mission is to+mission");
This works for me in the console. Not the most exciting script but basics work ok.
var first_name = window.prompt("Please enter your first name"); console.log(first_name); var second_name = prompt("Please enter your second name"); console.log(second_name); var age = prompt("Please enter your age"); console.log(age); console.log(alert("Thanks! You're now complete and free to go!")); var string = ('Hi ' + first_name + ' I can\'t believe you are ' + age + '. It has been so long since we last spoke!'); console.log(string); document.write(string);