Last active
May 5, 2017 17:25
-
-
Save ZeroX-DG/4adfbd3e4708c5eb33054649eb986fd3 to your computer and use it in GitHub Desktop.
Complex code
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
function getData(text){ | |
if(text.split(" ")[0] == "calc"){ | |
return text.split(" ")[1].split("_")[0] - text.split(" ")[1].split("_")[1]; | |
} | |
else{ | |
return false; | |
} | |
} | |
if(getData("calc 2_1")){ | |
console.log(getData("calc 2_1")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment