0

As I am new to Sharepoint Framework, I am trying to generate request ID for the request form using the pad function for adding leading laeding zeroes using No javascript framework version in SPFx webpart...

Please suggest me any workaround for this...

1 Answer 1

0
<script>
  let requestId="123456789";
  console.log(requestId.padStart("12","0"))    
</script>

You could use your way to generate request ID,this is a simple demo.

Document for your reference:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padStart

1
  • If my reply is helpful to you, you could mark it as an answer and vote it.Thank you.
    – Amos
    Aug 18, 2020 at 2:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.