Wyodrębnij z ciągu w JavaScript
let str = 'JavaScript Substring';
let substring = str.substring(0,10);
console.log(substring);
Code language: JavaScript (javascript)
OMAR
let str = 'JavaScript Substring';
let substring = str.substring(0,10);
console.log(substring);
Code language: JavaScript (javascript)
$(function () {
$.get('/your_file.txt', function (data) {
words = data.split('\s');
});
});
const extractText = () => {
const regex = /[A-Z/a-z/ /]/g;
const letters = text.match(regex);
const newText = letters.join("");
return newText;
};