Skip to content

Conversation

@llatpic
Copy link

@llatpic llatpic commented Feb 17, 2022

No description provided.

Copy link
Author

@llatpic llatpic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question

Comment on lines +109 to +120
let number = 1234;
function reverse(x) {
let toS = x.toString();
//console.log(toS);
let s = toS.split();
//console.log(s);
const splits = Array.from(toS);
let inv = splits.reverse();
//console.log(`inversed : ` + inv.join());
let join = inv.join();
let replace = join.replace(/,/g,"");
return replace
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to code it in a simpler way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant