Last active
June 10, 2019 23:18
-
-
Save LinZap/14bac03493239c338b201af684bd4aed to your computer and use it in GitHub Desktop.
Node.js - HK8
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
const proc_strng = require('./proc-string') | |
console.log(proc_strng.string_to_array('Hello world')) | |
console.log(proc_strng.string_to_int('00007777777')) |
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
// put in node-homework/proc-string | |
function string_to_array(str){ | |
return str.split('') | |
} | |
function string_to_int(str){ | |
return parseInt(str) | |
} | |
module.exports = { | |
string_to_array : string_to_array, | |
string_to_int : string_to_int, | |
} |
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
['H', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd'] | |
7777777 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment