Last active
October 4, 2017 08:00
-
-
Save JanBe/2704c9cecbdab51d52785b057b7ded7a to your computer and use it in GitHub Desktop.
Coding Test
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
<html> | |
<head> | |
<script type='text/javascript' src='assessment.js'></script> | |
</head> | |
<body></body> | |
</html> |
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
/* SMS can only be a maximum of 160 characters. | |
If the user wants to send a message bigger than that, we need to break it up. | |
We want a multi-part message to have this added to each message: | |
" - Part 1 of 2" | |
*/ | |
// You need to fix this method, currently it will crash with > 160 char messages. | |
const sendSmsMessage = function sendSmsMessage (text, to, from) { | |
deliverMessageViaCarrier(text, to, from) | |
} | |
// This method actually sends the message via a SMS carrier | |
// This method works, you don't change it, | |
const deliverMessageViaCarrier = function deliverMessageViaCarrier (text, to, from) { | |
SmsCarrier.deliverMessage(text, to, from) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment