0

[Solved] Need Help. i can seem to figure out whats wrong with my code. 'Uncaught syntax error: missing ) after argument list'

function song(name, artist, album) { this.name = name; this.artist = artist; this.album = album; } var p1 = new song(prompt("Name of the song?"), prompt("Name of the artist?"), prompt("Name of the album?")); document.write("<h1>Now Playing:</h1>"); document.write(song.name + " - " + song.artist + " (" + song.album ")");

14th Oct 2019, 5:26 PM
ļ¼³ļ¼„ļ¼§ļ¼”
ļ¼³ļ¼„ļ¼§ļ¼” - avatar
2 Answers
+ 1
song.album ")"); ? you need + there. also an error usually provide the line number where the error occur
14th Oct 2019, 5:37 PM
Taste
Taste - avatar
0
yeah it said line 10 which is the bottom line
14th Oct 2019, 5:40 PM
ļ¼³ļ¼„ļ¼§ļ¼”
ļ¼³ļ¼„ļ¼§ļ¼” - avatar