Using 3D transforms create an open door effect. Click the door to open and win a prize.
A Pen by Juan Moises Torrijos on CodePen.
const persons = [ | |
{ | |
name: 'Juan Perez', | |
nationality: 'Panamanian', | |
country_of_birth: 'Panama', | |
id_passport: '1', | |
date_of_birth: '2000-04-10', | |
}, | |
{ | |
name: 'Maria Perez', |
function toTitleCase(str: string | undefined | null) { | |
if (!str) return ""; | |
const nonCapitalizedWords = ["a", "an", "the", "and", "but", "or", "nor", "for", "yet", "so", "as", "at", "by", "for", "in", "of", "on", "per", "to", "with"]; | |
const nonCapitalizedWordsSpanish = ["un", "una", "unos", "unas", "el", "la", "los", "las", "y", "pero", "o", "ni", "por", "aún", "así", "como", "en", "por", "para", "de", "del", "al", "con"]; | |
return str.replace(/\w\S*/g, (txt: string) => { | |
if ([ | |
...nonCapitalizedWords, | |
...nonCapitalizedWordsSpanish | |
].includes(txt.toLowerCase())) { |
const persons = [ | |
{ | |
name: 'Juan Perez', | |
nationality: 'Panamanian', | |
country_of_birth: 'Panama', | |
id_passport: '1', | |
date_of_birth: '2000-04-10', | |
}, | |
{ | |
name: 'Maria Perez', |
var quadEquationSolver = function (a, b, c) { | |
var rootPart = Math.sqrt( (b * b) - (4 * a * c) ); | |
var denom = 2 * a; | |
var firstRoot = (-b + rootPart)/denom; | |
var secondRoot = (-b - rootPart)/denom; | |
console.log("The first root is " + firstRoot); | |
console.log("The second root is " + secondRoot); | |
}; |
//getGreeting function | |
function getGreeting (hour) { | |
hour = hour || new Date().getHours(); | |
if (typeof hour === "number"){ | |
if (hour <= 12) { | |
return "Good Morning"; | |
} else if (hour <= 17) { | |
return "Good Afternoon"; | |
} else { |
Using 3D transforms create an open door effect. Click the door to open and win a prize.
A Pen by Juan Moises Torrijos on CodePen.