-
-
Save franklinokech/455b9b22871d8004135d2ccab1253148 to your computer and use it in GitHub Desktop.
Google App Script to Concatenate Strings in a Google Spreadsheet
This file contains 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 myFunction() { | |
var exString="My Name is Franklin" | |
var numExample=107 % 97 | |
Logger.log(exString[1]) | |
//var exSqrt=Math.sqrt(numExample) | |
var examLog= Math.log(numExample) | |
//Logger.log(exSqrt) | |
Logger.log(examLog) | |
} | |
/* | |
this function takes the first name and last name and concatenate them to form a complete name | |
param:string names | |
return:concatenated emailes | |
*/ | |
var domain="@franklinokech.com" | |
function ConcatNames(names){ | |
return names[0][0][0].toLowerCase()+names[0][1].toLowerCase()+domain//when you run the EmailWriter in the Google sheet, passing multidimensational array, you should get conaacatenated array | |
} | |
function getPassword(){ | |
var wordDictionary=[ | |
'franklin','makiadi','jachien','omenda','technology' | |
]; | |
var randomNumber=Math.floor(Math.random()*10);//generate a random number between 0 and 1 and multimply it by 10 to have a good number | |
var randomKey=Math.floor(Math.random() * wordDictionary.length);//generate the random key to be used in the password | |
var password=wordDictionary[randomKey]+randomNumber;//concatenate the random with the first element in the array | |
return password; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment