Ok, I am in a JavaScript class, and I have no desire for anyone to do my schoolwork, I have already done what I think is correct, I am just hoping someone can take a look and tell me if I am close, or right, or whatever. Any feedback appreciated. Also, the instructor was very specific in saying that if it asks for a line of code, then just do a line of code- so if it appears things are missing that would be why.
1.Write a line of code using the Location object to return the uniform resource locator (URL) of a Web page to a variable called myWebPage.
function getLocation(){
alert(document.location);}
2.Write a line of code using the Navigator object to return the Web browser name to a variable called myBrowserName.
function getLocation(){
alert(navigator.appName);}
3.Write a line of code using the Screen object to return the height of the display screen, not including operating system features such as the Windows Taskbar, to a variable called myScreenHeight
function getLocation(){
alert("Total height is : "+screen.height);}
4.Write a line of JavaScript code using the Window object and other properties to open a new Web browser window with www.google.com displaying and no menu bar
function getWindow(){
window.open('http://www.google.com','mywindow','width=400,height=200');}
That's it! Let me know if I did anything wrong, thank you!