JavaScript Program to Create and Close Newly Created Window

Write a JavaScript program to create and close newly created window.

Source Code
    <title>Create and Close window</title>
        var win
        function createWindow() 
            win ="", "MyWindow", "width=300, height=200, toolbar=1")
        function closeWindow() 

<form name="myform">
    <input type="button" value="Create Window" onclick="createWindow()"/>
    <input type="button" value="Close Window" onclick="closeWindow()"/>


"Coding Hub - Learn to code" app now available on Google Play Store