I've just begun my journey into learning Javascript and wanted to test my skills by creating a program that prompts the user for their name and then prints it out in reverse. Here's what I came up with:
var name = prompt("Please enter your name");
name = new Array(name.length);
name.reverse();
document.write(name);
Can you spot any errors in this code?