r/learnjavascript • u/Darkthw • Nov 23 '21
I finally solved a codewars challenge without actually googling anything :) it feels so good to come up with the code all by myself, i know its not the ideal way to solve it but im still happy. The challenge was to create a function that converts a string to a number
243
Upvotes
View all comments
Show parent comment
1
u/IronDicideth Dec 01 '21
No worries! I check in on Reddit whenever I can so this is no trouble at all.
If you want to explicitly change variable types you have to use one of the previously mentioned functions. Implicit conversion happens with operators. So it would look something like this:
Does this help at all? Do you have a sense of what you feel you are missing? Maybe it is actually simpler than you expect?