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
$(document).ready(function() { | |
let f1err = 0, | |
f2err = 0, | |
f3err = 0, | |
date = new Date(); | |
$("#sendBTN").click(function() { | |
if (($("#username").val() == "") || ($("#phone").val() == "")) { | |
f1err = 1; | |
if ($("#username").val() == "") { |
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 tryAppStore() { | |
setTimeout(function() { | |
window.location = "https://appsto.re/tr/6XPCz.i"; | |
}, 25); | |
window.location="Barcode://scan/"; | |
} | |
function tryGoogleStore() { | |
setTimeout(function() { | |
window.location = "https://play.google.com/store/apps/details?id=com.google.zxing.client.android&hl=en"; |
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
let A = [4,12,9,5,6,1], | |
B = [4,9,12,6]; | |
function findMissing(A, B){ | |
let missingElements = []; | |
for (var i=0; i<A.length; i++){ | |
for (var j=0; j<B.length; j++){ | |
if (A[i] == B[j]) | |
break; |
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
const object = { | |
'1': 30, | |
'2': 58 | |
}; | |
function objectToArrConverter (obj) { | |
if (Object.entries(obj).length === 0) | |
return []; | |
else { | |
let arr = Object.entries(obj); |
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
const solution = (numbers) => { | |
let maxNumber = 0; | |
for (let i=0; i<numbers.length; i++){ | |
if (numbers.length < 1) | |
return maxNumber; | |
if (numbers[i] > maxNumber) | |
maxNumber = numbers[i]; | |
} | |
return maxNumber; |
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
const dataArr = [ | |
"B$u$i$ld", | |
"$t$$h$e", | |
"N$e$x$t", | |
"E$$ra", | |
"$$o$f$", | |
"S$$of$t$wa$r$e", | |
"De$$ve$l$op$me$n$t", | |
]; |
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
let numbersArr = [4, 6, 7, 9, 12]; | |
function findSecondBiggestNumber(numbers) { | |
numbers.sort((a, b) => a - b); | |
return numbers[numbers.length - 2]; | |
} | |
// console.log(findSecondBiggestNumber(numbersArr)); | |
let strForReverse = "Erhan"; |
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
// 1. Write a function for strings that return a string that's repeating the string | |
// for a given integer number for instance, given `"hello".repeatify(3)` expression | |
// should return "hello, hello, hello" as an output | |
String.prototype.repeatify = function (param) { | |
let result = ""; | |
for (let i = 0; i < param; i++) result += `, ${this}`; | |
return result.slice(1).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
/* | |
The depth of an integer n is defined to be how many multiples of n it is necessary to compute | |
before all 10 digits have appeared at least once in some multiple. | |
Example: let see n=42 | |
Multiple value digits comment | |
42*1 42 2,4 | |
42*2 84 8 4 existed | |
42*3 126 1,6 2 existed |
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
/* | |
Write a Function According to Given Brief: | |
The MEX number of a non-negative set of numbers is the smallest non-negative number that is not present in the set. | |
For example, MEX([1, 3, 10]) = 0, and MEX([0, 1, 2, 8]) = 3. | |
Your task is to take a given array arr of length num and remove the minimum number of elements from it so that, | |
the MEX value of the modified array is not equal to the MEX value of the original array. | |
- It should return the minimum number of elements that needed to be removed from the array |
OlderNewer