jon

Generation

generate functionTue, 04 Apr 2023

generate control char of italian fiscal code

function getControlChar(surname, name, birth, gender, town) { if(surname == "") return ""; if(name == "") return ""; if(birth == "") return ""; if(gender == "") return ""; if(town == "") return ""; birth = birth.substring(2); var vowels = "AEIOU"; var consonants = "BCDFGHJLMNPQRSTVWXYZ"; var surname_out = ""; var name_out = ""; var town_out = ""; var i = 0; var j = 0; var c = 0; var ch = ""; var temp = ""; for (i = 0; i < surname.length; i++) { ch = surname.substring(i, i+1); for (j = 0; j < vowels.length; j++) { temp = vowels.substring(

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant