Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(...args) {
- let count = 0
- for (let num of args) {
- for (let char of num.toString()) {
- if (char.includes('-')) {
- count++;
- }
- }
- }
- console.log(count % 2 == 0 ? 'Positive' : 'Negative')
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement