new to JS.
I'm using google script to create a function that will input a string will output the interger in it (if any). In order to optimize for google script, I've read suggestions on allowing also ranges as input.
I'm getting an error when using .map, but I can't figure out what it is. Any help. I've been looking for more examples of the use of map but none were helpfull.
Any idea?
thanks everyone
if (input.map) {
input.map(
if (isInt(split[i])) {
result = split[i]
});
} else {
for (i = 0; i < split.length; i++) {
if (isInt(split[i])) {
result = split[i];
}
}
}
mapis afunctionwhat you have is anexpressionMDN.inputarray, thenforEachis better suited thanmap.foo(if(true) { ... }). That doesn't make sense. MDN usually has examples.