Sign in Welcome! Log into your account your username your password Forgot your password? Get help Password recovery Recover your password your email A password will be e-mailed to you. HomeArenaQuiz #7 ArenaQuiz Quiz #7 By Coding Artist 4th November 2022 0 386 Share Facebook Twitter Pinterest WhatsApp 94 Created by Coding Artist Quiz #7 1 / 10 let a = 15;let greeting = a % 2 == 0 ? "hello" : a % 4 == 0 ? "hi" : "bye";console.log(greeting);What will the above code output to the console? hello Throws an error hi bye 2 / 10 let nums1 = [10, 20, 30];let nums2 = [...nums1];nums1[1] = 40;console.log(nums2);What will the above code output to the console Throws An Error [10, 20, 30] [40, 20, 30] [10, 40, 30] 3 / 10 let nums = [78, 43, 3, 23, 5];nums.sort();nums.reverse();console.log(nums);What will the above code output to the console? [78, 43, 23, 5, 3] [78, 5, 43, 3, 23] [3, 5, 23, 43, 78] [23, 3, 43, 5, 78] 4 / 10 let a = "1" + 1;let b = "1" - 1;console.log(a + b);What will the above code output to the console? 20 1111 110 2 5 / 10 a = 5;var a;console.log(a);What will the above code output to the console? Syntax Error Reference Error 5 Type Error 6 / 10 let num = Math.floor(Math.random() * 10);console.log(num);What will the above code output to the console? Returns a random integer from 0 to 9 Returns a random integer from 0 to 10 Returns a random integer from 1 to 9 Returns a random integer from 1 to 10 7 / 10 let myFunc = (x, y = 10) => { return x + y;};console.log(myFunc(5, true));What will the above code output to the console? 6 15 5 5true 8 / 10 let months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",];let myDate = new Date();myDate.setMonth(12);console.log(months[myDate.getMonth(1)]); Jan Feb Dec Nov 9 / 10 let months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",];let myDate = new Date();myDate.setMonth(6);console.log(months[myDate.getMonth()]); May Jun Aug Jul 10 / 10 let str = " I enjoy coding! ";console.log(str.trim());What will the above code output to the console? enjoy coding! Ienjoycoding! I enjoy coding I enjoy coding! Your score is The average score is 44% LinkedIn Facebook Twitter VKontakte 0% Restart quiz Tagscss advanced quizhtml quiz for beginnersjavascript advanced quizjavascript quizjavascript quiz for beginnersquizquiz bank Share Facebook Twitter Pinterest WhatsApp Previous articleMCQ – 4/11/22Next articleImage Color Picker | Javascript Coding Artist RELATED ARTICLES Arena Javascript Quiz For Intermediates 24th July 2023 Arena Javascript Quiz For Beginners 16th July 2023 Arena MCQ – 10/2/23 10th February 2023 LEAVE A REPLY Cancel reply Comment: Please enter your comment! Name:* Please enter your name here Email:* You have entered an incorrect email address! Please enter your email address here Website: Save my name, email, and website in this browser for the next time I comment. Please enter an answer in digits:2 × one = Most Popular How to Create a Responsive Multi-Level Dropdown Menu Using HTML & CSS 2nd June 2025 Build an Image Gallery with Search and Filter Using HTML, CSS, and JavaScript 28th May 2025 Build a Random Joke Generator with HTML, CSS & JavaScript 24th May 2025 Build an Interactive Story Generator with HTML, CSS & JavaScript 23rd May 2025 Load more