AlgoDaily Solution
1Locked, only available for premium members.Community Solutions
Community solutions are only available for premium users.
Access all course materials today
The rest of this tutorial's contents are only available for premium members. Please explore your options at the link below.
xxxxxxxxxx45
var assert = require('assert');function firstNonRepeat(str) { // fill this in return str;}try { assert.equal(firstNonRepeat(''), ''); console.log('PASSED: ' + "`firstNonRepeat('')` should return `''`");} catch (err) { console.log(err);}try { assert.equal(firstNonRepeat('a'), 'a'); console.log('PASSED: ' + "`firstNonRepeat('a')` should return `'a'`");} catch (err) { console.log(err);}try { assert.equal(firstNonRepeat('oh my god dude where is my car'), 'g'); console.log(OUTPUT
Results will appear here.