Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve (numbers) {
- while (numbers.length !== 0) {
- let result = 'true';
- let input = numbers.shift().toString();
- for (let i = 1; i <= input.length / 2; i++) {
- if (input[i - 1] !== input[input.length - i]) {
- result = 'false';
- break;
- }
- }
- console.log(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement