error Uncaught SyntaxError: Unexpected token ‘>=’ Beranda › Forums › Belajar Menjadi Full Stack Web Developer Tingkat Pemula › error Uncaught SyntaxError: Unexpected token ‘>=’ Tagged: Array This topic has 2 replies, 2 voices, and was last updated 3 years, 11 months ago by Coach Vincent. Viewing 3 posts - 1 through 3 (of 3 total) Author Posts October 31, 2022 at 2:39 PM #170870 Agung MagrizalParticipant hallo coach mohon pencerahannya coach sudah ikuti sesuai codingnya coach cm dijalanin error Uncaught SyntaxError: Unexpected token ‘>=’ for(var i = 0; i < murid.length; i++){ if(murid[i][2]) >= 3.0){ console.log(murid[i][0] + “. ” + murid[i][1] + “, IPK = ” + murid[i][2] + “, Lulus”); } else { console.log(murid[i][0] + “. ” + murid[i][1] + “, IPK = ” + murid[i][2] + “, Gagal”); } } October 31, 2022 at 3:04 PM #170875 Agung MagrizalParticipant Sudah Nemu kendalanya karena ada tanda ) sebelum >= 3.0 : harusnya saya buat seperti ini var murid = [ [1, “Vincent”, 3.5], [2, “Udin”, 3.0], [3, “Mamang”, 2.1] ] for(var i = 0; i < murid.length; i++){ if(murid[i][2] >= 3.0){ console.log(murid[i][0] + “. ” + murid[i][1] + “, IPK = ” + murid[i][2] + “, Lulus”); } else { console.log(murid[i][0] + “. ” + murid[i][1] + “, IPK = ” + murid[i][2] + “, Gagal”); } } December 2, 2022 at 6:36 PM #186630 Coach VincentModerator terima kasih kak Author Posts Viewing 3 posts - 1 through 3 (of 3 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Login with your Social ID Log In