A Pen by Smith

This awesome code was written by ssmitty, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright ssmitty ©
  • HTML
<!DOCTYPE html>
<html lang="en" >

  <meta charset="UTF-8">
  <title>A Pen by  Smith </title>


  <DOCTYPE html>
     <title>Smith S Lab 3</title>
	<link rel="stylesheet" href="Task2.css" type="text/css" />
  <script lanuage="Javascript" type="text/javascript">
      functiongetLuckyInfo (){
      // Create an array and populate it with 7 colors
      colors= new Array(7);
      colors[0] ="lightpink";
      colors[1] ="orange";
      colors[2] ="yellow";
      colors[3] ="lightgreen";
      colors[4] ="lightblue";
      colors[5] ="violet";
      colors[6] ="white";
      /*Calculate a random number between 0 and the number of elelments
        in the colors array*/  
 document.write("<p style='background-color:" + colors[i] + "'> Your lucky color is " + colors[i] + "</p> )

  a.	What variable is defined in the function? <br/>
  b.	How many elements are in the colors array?"<br/>
  <div id="luckyinfo">
             <script language-"Javascript" type="text/javascript">