Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
Credit to user Zakk which exampled a solution here. document.body.innerHTML = document.body.innerHTML.replace(/x/g, '*'); Which I've adjusted to my particular need (a particular scope inside th...
Answer
#3: Post edited
Credit to user Zakk which [exampled a solution here](https://software.codidact.com/comments/thread/6161#comment-17132).- ```javascript
- document.body.innerHTML = document.body.innerHTML.replace(/x/g, '*');
- ```
- Which I've adjusted to my particular need (a particular scope inside the body scope) this way:
- ```javascript
- document.querySelector('.new_pages').innerHTML = document.querySelector('.new_pages').innerHTML.replace(/x/g, '');
- ```
- Credit to user [Zakk](https://software.codidact.com/users/56561) which [exampled a solution here](https://software.codidact.com/comments/thread/6161#comment-17132).
- ```javascript
- document.body.innerHTML = document.body.innerHTML.replace(/x/g, '*');
- ```
- Which I've adjusted to my particular need (a particular scope inside the body scope) this way:
- ```javascript
- document.querySelector('.new_pages').innerHTML = document.querySelector('.new_pages').innerHTML.replace(/x/g, '');
- ```
#2: Post edited
Credit to user Zakk which [exampled a solution here](https://software.codidact.com/posts/286304).- ```javascript
- document.body.innerHTML = document.body.innerHTML.replace(/x/g, '*');
- ```
- Which I've adjusted to my particular need (a particular scope inside the body scope) this way:
- ```javascript
- document.querySelector('.new_pages').innerHTML = document.querySelector('.new_pages').innerHTML.replace(/x/g, '');
- ```
- Credit to user Zakk which [exampled a solution here](https://software.codidact.com/comments/thread/6161#comment-17132).
- ```javascript
- document.body.innerHTML = document.body.innerHTML.replace(/x/g, '*');
- ```
- Which I've adjusted to my particular need (a particular scope inside the body scope) this way:
- ```javascript
- document.querySelector('.new_pages').innerHTML = document.querySelector('.new_pages').innerHTML.replace(/x/g, '');
- ```
#1: Initial revision
Credit to user Zakk which [exampled a solution here](https://software.codidact.com/posts/286304). ```javascript document.body.innerHTML = document.body.innerHTML.replace(/x/g, '*'); ``` Which I've adjusted to my particular need (a particular scope inside the body scope) this way: ```javascript document.querySelector('.new_pages').innerHTML = document.querySelector('.new_pages').innerHTML.replace(/x/g, ''); ```