Your Submissions
You haven't submitted any code for this challenge yet. Solve the problem by passing all the test cases, and your submissions will appear here.
xxxxxxxxxx
39
var assert = require('assert');
function custom_sort_string(order, s) {
//fill in the solution
return;
}
try {
assert.equal(custom_sort_string('fed', 'adef'), 'feda');
console.log('PASSED: ' + "custom_sort_string('fed', 'adef') should return `feda`");
} catch (err) {
console.log(err);
}
try {
assert.equal(custom_sort_string('cba', 'abcd'), 'cbad');
console.log('PASSED: ' + "custom_sort_string('cba', 'abcd') should return `cbad`");
} catch (err) {
console.log(err);
}
try {
assert.equal(custom_sort_string('cbafg', 'abcd'), 'cbad');
console.log('PASSED: ' + "custom_sort_string('cbafg', 'abcd') should return `cbad`");
OUTPUT
Results will appear here.