Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript replace

var entrada   = "Aprenda Javascript. JavaSCRIPT e Typescript";
var resultado = entrada.replace(/script/gi, "Script");
console.log({entrada, resultado})
/* Valor retornado: 
{
   entrada: 'Aprenda Javascript. JavaSCRIPT e Typescript', 
 resultado: 'Aprenda JavaScript. JavaScript e TypeScript'
}
*/
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #replace
ADD COMMENT
Topic
Name
2+3 =