Very Easy Javascript Solution!!!!!!!!
\n/**\n * @param {number} num\n * @return {number}\n */\nvar smallestNumber = function (num) {\n  let d = String(num).split("");\n\n  //basic sorting based on n
```\n/**\n * @param {number} num\n * @return {number}\n */\nvar smallestNumber = function (num) {\n  let d = String(num).split("");\n\n  //basic sorting based on num is positive or negative number\n  num > 0\n    ? d.sort((a, b) => parseInt(a) - parseInt(b))\n    : d.sort((a, b) => parseInt(b) - parseInt(a));\n\n  // basic pushing zero from start to end\n  for (let i = 0; i < d.length; i++) {\n    if (parseInt(d[i]) != 0) {\n      [d[0], d[i]] = [d[i], d[0]];\n      break;\n    }\n  }\n\n  return Number(d.join(""));\n};\n\n```
['Sorting', 'JavaScript']