+ 7
How to make a simple program that shows like your name
Since Olin Guerrero came with the idea to make like a program that like does this Input : Example and 28 The name of him is ...( example ) and hes ... (28) years old Thank you all!
13 Answers
+ 8
Like in what programming language? Like where's your attempt?
https://www.sololearn.com/discuss/1316935/?ref=app
+ 6
Hey mine, here's the code for you: https://code.sololearn.com/WPLKBFMK1sBP/?ref=app
You'll notice in the code how I've NOT used any fancy trick for string concatenation. It's just that simple.
Also, I've used labels with inputs in the form since the label tag is specifically used to put labels on input boxes.
I hope this helps.
Edit: Please don't ask these twice. You could have continued the discussion in this thread.
https://www.sololearn.com/Discuss/1844341/?ref=app
+ 5
Anna Here is my try, https://code.sololearn.com/WI9jRDp98i7w/?ref=app i dont know how to get the info to the text though.. If someone could help me with that.. that would be amazing! and yes, i searched on google but only found things about get and post things wich i think isnt really usefull in this..
+ 5
I think your input is correct. But you need an output.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output
+ 5
What about this?
https://code.sololearn.com/cmTJ97RZR2xV/?ref=app
+ 4
do you know how to get input?
+ 3
Olin Guerrero sadly, nope..
+ 3
Jonas thank you alot! i got alot further now! buttt im now trying to get the hello, and the name on the same line with what i made.. ( https://code.sololearn.com/WuMfDcxI0736/?ref=app ) I tried putting both the ids in the same <p> but that didnt work.. also read about <span> wich also didnt work, If anyone could help me with that, then i think i almost completed my first project in html! ( also going to add the age thing but that will be easy. )
+ 2
My C# approach
https://code.sololearn.com/c2738zWabKH2/?ref=app
+ 2
Well, thank you all.. But im still stuck, i tried to use output but couldnt find it to work.. i tried to find something on youtube and stuff and did it like this.. https://code.sololearn.com/WxTN9kiO1v0w But it still doenst work and i dont know why. If anyone could help me that would be great!
+ 2
The code had some syntax errors. I've fixed the code and put a comment to highlight the errors.
Syntax errors are common mistakes for everyone including advance programmers. It is easy to miss a semicolon or mixing up zeros with a letter "o" and stuff like that.
We just need to put more attention when typing.
https://code.sololearn.com/W0vKo7cU0BjY/?ref=app
+ 2
I think the trick is inside the function, just concatenate the string in the same manner of the first code you posted. Just build the string something like:
...("Hello" + Name + LastName);
I really don't now JavaScript (yet) but is all about a programming mindset. Make sure you know the foundations on programming like data types, functions, variables, algorithm design and all that stuff.
I think you have more knowledge in JavaScript than me but probably your foundations in programming can be improved.
+ 2
thanks all for your help!