Function to convert of string like this: "12 -> 12, 21" - "123 -> 123, 132, 231, 213, 312, 321"?


#1

I would like to convert the string like this

12 -> 12, 21
123 -> 123, 132, 231, 213, 312, 321

Please help me.


#2

I do not think there is any Meteor specific permutation provider


#3

I would like create the function do this.
But I can’t.


#4

Try stackoverflow.com. You don’t even have to tag it as meteor, just do JS, you’ll prob get more replies. After you post that there. I’ll respond to your question there on stackoverflow. It’s dumb, I know, its just formalities… just bear with me, I will help you, this just isn’t the right place to ask that question :frowning:


#5

Thanks for your reply, but I don’t know the keyword to search.


#6

Go to this link. Then login and post the same question (title and body text), then copy the link and post it back here…


#7

Excuse me, I don’t the keyword (function name) to search.
for example reverse string in javascript?


#8

Hey @theara, I take it english isn’t your first language and I’m not trying to offend yah, nor disheartened your eagerness to learn. I really admire that!! :grinning: but I can’t do much more than point you in the right direction here… If you’re having trouble submitting a post to StackOverflow(the correct resource for such questions) I really suggest you try to get a better handle on english. It really sucks and I hate to have to be the one to put you off like this, but the vast majority of the developer resources out there are, um indeed, in english :confused: I don’t know what your situation is/your goals I mean there are certainly many good programmers who don’t know a word of english but meteor/es6/etc is just something that’s flared up recently and from what I’ve seen, most of the developers are english speaking :confused:

I went and looked at some of you’re questions from the past few weeks:

not really meteor related though

cropping a photo has nothing to do with meteor

totally unrealated to meteor, but thats not like an issue if you’ve just asked this kind of thing once


then you ask the same non-meteor related question here

https://forums.meteor.com/t/h ow-to-add-google-material-icon-font-assets-for-t00rk-bootstrap-material-datetimepicker/14008
doesn’t work offline because your css is loading a file from the internet…

Thanks for your reply, sorry it is empty string ‘’; not space.
Yes I would like to return no data found null or ‘’ or false or undefined, which one?.

My Response
each one of these is falsey (google it) so the code

if (myVar) {

doThing();

}

will equate to true if myVar is 0,null,undefined,NaN,{}, '', etc


#9

I already mentioned the keyword in this thread.


#10

I’m no moderator. But I just want to say that many of these posts of you’ve made recent normally wouldn’t be permitted. We try to keep questions here specific to things about meteor so users with similar issues can track down the original oiissues with can.

Again It’s awesome that you want to learn,. I’d be glad to help you, it’s just got to be within the right context. forums.meteor.com isn’t the right place.


#11

Sorry my English not good.


#12

Don’t feel bad! My cambodian isn’t very good either :stuck_out_tongue: