Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Click to send whastapp
//{{ *YOURNUMBER* }}&text=%20{{ *YOUR MESSAGE* }}
var yourNumber = "{{ your number in string}}"
var yourMessage = "{{ your message in string }}"
// %20 mean space in link
// If you already had an array then you just join them with '%20'
// easy right
function getLinkWhastapp(number, message) {
number = this.yourNumber
message = this.yourMessage.split(' ').join('%20')
return console.log('' + number + '&text=%20' + message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment