Created
October 29, 2019 20:05
-
-
Save romaefGit/efc66567c9fa7d28cda32023c7ce441b to your computer and use it in GitHub Desktop.
JavaScript - Reviza si existe un valor en una variable de cualquier tipo
This file contains hidden or 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
| /** | |
| * Autor - Romario Augusto Estrada Flórez -romarioestrada.ff@hotmail.com | |
| * [existTheValue reviza que una variable no esté vacía.] | |
| * @param {[Array, String, Integer, Float...]} value [El valor de la variable] | |
| * @return {[Boolean]} [Returna true si existe, false si no] | |
| */ | |
| var existTheValue = function(value) { | |
| if ((value == '') || (value == null) || (value == undefined) || (value == [])) { | |
| return false; | |
| } else { | |
| return true; | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment