This is my unique text:
let x = "Learning new things every day!";
I am utilizing the substring()
method to extract a specific part of it:
console.log(x.substring(9, 12));
Instead of the entire string, I only want the word 'new'.
let x = "learning something new today"
console.log(x.substring(17, 20));
<script src="https://ajax.googleapis.com/ajax/libs/reactjs/2.5.4/react.min.js"></script>
Can anyone assist me with this query?