Skip to content

Instantly share code, notes, and snippets.

View stafa-san's full-sized avatar

StaFa stafa-san

View GitHub Profile
@stafa-san
stafa-san / interview2.js
Created September 22, 2021 14:20
Form Interview 2
const wholeNumbers = new Set();
function getUniqueSortedNumbers(arr) {
for (words in arr) {
if (typeof arr[words] === 'number') {
wholeNumbers.add(arr[words]);
}
getUniqueSortedNumbers(arr[words]);
}
return Array.from(wholeNumbers).sort();
}
@stafa-san
stafa-san / interview1.js
Last active September 22, 2021 13:42
interview form queston 1
console.log(3, typeof(3)); // 3 "number"
console.log("a", typeof("a")); // "a" "string"
console.log(2, typeof(2), "a", typeof(2)); // 2 "number" "a" "string"