Hi everyone, I'm new to the "React" javascript framework to improve my skills, I gave myself as an exercise to convert a number or string into a symbol. For example a number will convert like this and a string will convert like this <?L> I present to you my code that I was able to write to reach the end of my exercise on pastebin:
https://pastebin.com/uKeMM1zT
and here is the result I get in return
characters such as <?d> or <?L> do not appear as many times as the string inserted in the input
if I could get some help from the more experienced or someone who has any idea how to fix this it will warm my heart.
I've been looking for a solution on the internet for 3 days, but nothing solves my problem or maybe I'm not typing the right keywords.
Top comments (5)
I don't even know js but try this try to break the given string into char and run a loop until strlength for each iteration prink ?d
like this you mean?
//button
const [ConvertInput, setConvertInput] = useState();
the whole code on: pastebin.com/uKeMM1zT
Yeah some wt like this is it working?
absolutely not, it's been 3 days I imagined all kinds of algorithms to get there
Means wt you really need when your input is string it should print ?L and when it a number it should print ?d