Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function az(input) {
- let test_str = String(input);
- let print_String = [];
- for (let i = 0; i < 115; i++) {
- let start_position = test_str.indexOf('(');
- let end_position = test_str.indexOf(')', start_position);
- var text_to_get = test_str.substr(start_position + 1, end_position - start_position - 1);
- let removed_String = test_str.substr(0, end_position + 1);
- test_str = test_str.replace(removed_String, '');
- print_String.push(text_to_get);
- }
- let x = print_String.filter(function (e) {
- return e
- }).toString();
- console.log(x);
- }
- az(['Rakiya (Bulgarian brandy) is self-made liquor (alcoholic drink)']);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement