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.
xxxxxxxxxx47
var assert = require('assert');/** * @param {character[]} str * @return {number} */function compactLength(str) { // fill this in return str.length;}try { assertIsFunction(compactLength, 'compactLength is a function'); console.log('PASSED: ' + '`compactLength` is a function');} catch (err) { console.log(err);}try { assert.equal(compactLength('a'), 1); console.log('PASSED: ' + "compactLength('a') should return 1");} catch (err) { console.log(err);}OUTPUT
Results will appear here.