We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a3eb93 commit 477535cCopy full SHA for 477535c
JavaScript/chapter01/1.3 - URLify/rroque98_sol.js
@@ -0,0 +1,8 @@
1
+// Write a method to replace all spaces within a string with '%20'
2
+
3
+const URLify = (string) => string.split(' ').join('%20');
4
5
+// Tests:
6
+console.log(URLify('Hello World') === 'Hello%20World');
7
+console.log(URLify('') === '');
8
+console.log(URLify('This is an example') === 'This%20is%20an%20example');
0 commit comments