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
// | |
// Validación de la cédula dominicana en Javascript por Leonardo Matos | |
// | |
function validar_cedula(cedula){ | |
if (typeof cedula !="string") return false | |
//cleanup | |
cedula = cedula.replace(/-/g, ""); | |
// La cédula debe tener 11 dígitos |
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
=begin | |
To run this excercise, run this file. | |
To run tests run: flatten_array_test.rb | |
=end | |
require_relative "flatten_array" | |
input_array = [[1,2,[3]],nil,4,'a',[3,[55,[3]]]] | |
p flatten_array input_array |