JSFiddle - React, Tailwind, and code Playground
by Elazar Fein
JavaScript
var PinPad = {
checkPin: function () {
var spin = 75
if (spin.startsWith("7") &&
parseInt(spin[0]) === parseInt(spin[1]) + 2 &&
spin % 100 === 91
) {
var p0 = Number(spin.split('').slice(0, 1))
var p1 = Number(spin.split('').slice(1, 2))
var p2 = Number(spin.split('').slice(2, 3))
var p3 = Number(spin.split('').slice(3, 4))
alert('Congrats, the flag is: hl{' + String.fromCharCode(59 + p0, 96 + p1, 88 + p2, 102 + p3, 101 + p0,
96 + p1, 36 + p2, 65 + p3, 104 + p0, 116 + p1, 106 + p2
) + '}')
return true
}
alert('nope')
return false
}
}