Advertisement
Grossos

RightPlace

Sep 20th, 2023
898
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function rightPlace(string, char, string2) {
  2.  
  3.     let x = char.charAt(0);
  4.  
  5.     let result = string.replace('_', x);
  6.  
  7.     if (result === string2) {
  8.         console.log('Matched');
  9.     } else {
  10.         console.log('Not Matched');
  11.     }
  12.  
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement