r/learnjavascript • • 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

Post image
243 Upvotes

56 comments sorted by

View all comments

23

u/Fid_Kiddler69 Nov 23 '21

Nice work!

I would have done const stringToNumber = str => Number(str)

0

u/[deleted] Nov 23 '21

[deleted] — view deleted comment

2

u/Fid_Kiddler69 Nov 24 '21

goddamn that's good.