How to delete a SharePoint list using PnP JS Library in Office 365 or SharePoint 2016?

Hello SharePointers,

In this blog, we will go through piece of power shell  JS code to delete a SharePoint list using PnP JS Library.
<script type=”text/javascript”>

$pnp.sp.web.lists.getByTitle(‘MyCustomLists’).delete().then(function(result) {
alert(‘List deleted successfully!!! Have Fun!!’)
});

</script>

Happy SharePointing Folks!!

Leave a Reply

Your email address will not be published.