A better way to show alerts in your next projects

I am 17 years old and a young passionate and self-taught frontend web developer and have an intention to become a successful developer. I usually write about JavaScript and Web Development and share some tips in the articles.
Are you bored with the default alert(); of the browser?
Even I am bored with that error π
But now not anymore, there is a powerful JavaScript library to create amazing alerts - Sweet Alert
Let's create some amazing alerts
- Import Sweet Alert to your project
https://cdnjs.cloudflare.com/ajax/libs/sweetalert/2.1.2/sweetalert.min.js - Now let's create three different types of alerts
1) Success
2)Warnconst success = () => { swal ( "Welcome!" , "Follow at @codewithsnowbit" , "success" ) }3) Errorconst warn = () => { swal ( "You forgot something!" , "Follow at @codewithsnowbit" , "warning" ) }Check out the live demo:const error = () => { swal ( "Oops" , "Something's not right" , "error" ) }
Thank you for reading
- Follow me on Twitter - @codewithsnowbit
- Subscribe me on YouTube - Code With SnowBit




