Answers for "simple javascript code"

5

javascript code

html>
<head>
  <title>Multiplication Table</title>
  <script type="text/javascript">
    var rows = prompt("How many rows for your multiplication table?");
    var cols = prompt("How many columns for your multiplication table?");
    if(rows == "" || rows == null)
   		 rows = 10;
    if(cols== "" || cols== null)
   		 cols = 10;
    createTable(rows, cols);
    function createTable(rows, cols)
    {
      var j=1;
      var output = "<table border='1' width='500' cellspacing='0'cellpadding='5'>";
      for(i=1;i<=rows;i++)
      {
    	output = output + "<tr>";
        while(j<=cols)
        {
  		  output = output + "<td>" + i*j + "</td>";
   		  j = j+1;
Posted by: Guest on July-19-2020
1

simple javascript code

let data = {
  name:"Brendan Eich",
  inventor :"Javascrpt"
}
console.log(`The name of his is ${data.name}. He is the inventor of ${inventor} programming language`);
Posted by: Guest on February-04-2021
1

javascript code

function getIntoAnArgument() {
    var args = arguments.slice();
    args.forEach(function(arg) {
        console.log(arg);
    });
}
Posted by: Guest on July-19-2020
0

javascript example code

var one = 1
if (one >= 1) {
    console.log("CHANGE VAR TO 0")
 }
Posted by: Guest on January-08-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language