How to make copy of a string in JavaScript

1 Answer

0 votes
const str = "javascript php c c++";

const copy = str;

console.log(copy);


  
    
    
/*
run:
    
"javascript php c c++"
    
*/

 



answered Jun 4, 2021 by avibootz
...