This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
/** | |
* | |
* Basic static web server with logger using node.js. | |
* Listen on port 8880, IP defaults to 127.0.0.1 | |
* | |
**/ | |
'use strict'; | |
var http = require("http"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function findIntersection(strArr) { | |
let result = []; | |
if (Array.isArray(strArr)) { | |
let arg1 = strArr[0].split(",").map(elem => elem.trim()); | |
let arg2 = strArr[1].split(",").map(elem => elem.trim()); | |
arg1.filter(a => { | |
if (arg2.includes(a)) { | |
result.push(a.trim()); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function QuestionsMarks(str) { | |
let numbers = []; | |
let inputStrArr = str; | |
let numbersWithIndex = []; | |
let result = false; | |
for (let i = 0; i < inputStrArr.length; i++) { | |
if (parseInt(inputStrArr[i], 10)) { | |
numbers.push(inputStrArr[i]); | |
numbersWithIndex.push({ |
OlderNewer