JSFiddle - React, Tailwind, and code Playground

by Andra Jimenez

HTML

<p>This is the first assignment</p>

<div>This is the first assignment</div>

<h4>This is a subtraction example</h4>

CSS

p{
    color:green;
    font-size:20px;
    border-style:solid;
    border-width:1px;
 }

div{
    color:pink;
    text-decoration:underline;
    
}

h4{
 color:blue;   
}
}

JavaScript

document.querySelector("p").textContent = "This is an example";

document.querySelector("div").textContent = "This is another example";

function add(a, b) {
  return a + b;
}


console.log(add(1,2));

function subtract(d, e) {
  return d - e;
}


document.querySelector("h4").textContent = "If you subtract one from two, you get " + subtract(2,1);




function yellAtMe(thingtoyell){
    return "the thing you've said is "+ thingtoyell + thingtoyell.toUpperCase();
}



alert(yellAtMe("fooooo"));

document.querySelector("p").textContent = (yellAtMe("Hey Foo!"));

document.querySelector("div").textContent = (yellAtMe("Hey Again!"));

var result = (function(a,b) {return a*b})(3,4);
alert(result);


function whisper(b){
     return b.toUpperCase();
}

alert(whisper("hey andrea"));


function multiply(arr) {}

console.log( multiply([1,2,3,4,5,6]);