function spaceMaker(str) { return str.split("").join(" "); }
function spaceMaker(str){- function spaceMaker(str) {
- return str.split("").join(" ");
- }
// TODO: Replace examples and use TDD development by writing your own tests // These are some CW specific test methods available: // Test.expect(boolean, [optional] message) // Test.assertEquals(actual, expected, [optional] message) // Test.assertSimilar(actual, expected, [optional] message) // Test.assertNotEquals(actual, expected, [optional] message) // NodeJS assert is also automatically required for you. // assert(true) // assert.strictEqual({a: 1}, {a: 1}) // assert.deepEqual({a: [{b: 1}]}, {a: [{b: 1}]}) // You can also use Chai (http://chaijs.com/) by requiring it yourself // var expect = require("chai").expect; // var assert = require("chai").assert; // require("chai").should(); Test.expect(spaceMaker("october"), "o c t o b e r" ); Test.expect(spaceMaker("space"), "s p a c e" ); Test.expect(spaceMaker("random"), "r a n d o m" ); Test.expect(spaceMaker("javascript"), "j a v a s c r i p t" ); Test.expect(spaceMaker("codewars"), "c o d e w a r s" ); Test.expect(spaceMaker("string"), "s t r i n g" ); Test.expect(spaceMaker("make me a burger"), "m a k e m e a b u r g e r"); Test.expect(spaceMaker("out of storage"), "o u t o f s t o r a g e");
- // TODO: Replace examples and use TDD development by writing your own tests
- // These are some CW specific test methods available:
- // Test.expect(boolean, [optional] message)
- // Test.assertEquals(actual, expected, [optional] message)
- // Test.assertSimilar(actual, expected, [optional] message)
- // Test.assertNotEquals(actual, expected, [optional] message)
- // NodeJS assert is also automatically required for you.
- // assert(true)
- // assert.strictEqual({a: 1}, {a: 1})
- // assert.deepEqual({a: [{b: 1}]}, {a: [{b: 1}]})
- // You can also use Chai (http://chaijs.com/) by requiring it yourself
- // var expect = require("chai").expect;
- // var assert = require("chai").assert;
- // require("chai").should();
- Test.expect(spaceMaker("october"), "o c t o b e r" );
- Test.expect(spaceMaker("space"), "s p a c e" );
- Test.expect(spaceMaker("random"), "r a n d o m" );
- Test.expect(spaceMaker("javascript"), "j a v a s c r i p t" );
- Test.expect(spaceMaker("codewars"), "c o d e w a r s" );
Test.expect(spaceMaker("string"), "s t r i n g" );- Test.expect(spaceMaker("string"), "s t r i n g" );
- Test.expect(spaceMaker("make me a burger"), "m a k e m e a b u r g e r");
- Test.expect(spaceMaker("out of storage"), "o u t o f s t o r a g e");