I\'m attempting to solve this leetcode question. See my javascript code as follows -
var backspaceCompare = function(S,