Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

find difference between string js

// Find Difference Between Two String
function findDiff(str1, str2){ 
  let diff= "";
  str2.split('').forEach(function(val, i){
    if (val != str1.charAt(i))
      diff += val ;         
  });
  return diff;
}
 
PREVIOUS NEXT
Tagged: #find #difference #string #js
ADD COMMENT
Topic
Name
3+9 =