+ 1

How to do this in JavaScript?

I want a code that make a version of a sentence underit everytime we clicked in it.then,when we click in the version sentence,it's write "this sentence is cloned" in the body or in the console. Please help me guys!

20th Apr 2022, 2:12 PM
صلاح الدين حلواني
5 Réponses
+ 3
صلاح الدين حلواني You aren't paying Lisa to write code, so why should she? Sololearn is a self-learning platform. You need to write the code and then ask people to help with the problems that appear (sharing your code for the helpers to see). Please read the guidelines and maybe do some searching for yourself.
20th Apr 2022, 5:35 PM
Ausgrindtube
Ausgrindtube - avatar
+ 1
You could put a button element in the html and then add a Javascript function to it: Whenever you click the button, the function appends text to a paragraph or something
20th Apr 2022, 2:40 PM
Lisa
Lisa - avatar
+ 1
I hinted the approach. How exactly you want to do it, it up to you.
20th Apr 2022, 3:12 PM
Lisa
Lisa - avatar
0
Lisa not enough reponse, You forget the second thing
20th Apr 2022, 3:09 PM
صلاح الدين حلواني
0
Lisa I want,when I click in the version sentence,it's write:this sentence is cloned.
20th Apr 2022, 3:15 PM
صلاح الدين حلواني