Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. function compareStatus() {
  2. if(valueTruebutton === statusRandomrapper) {
  3. alert("Both status are true");
  4. } else {
  5. alert("Nah, those status are different");
  6. }
  7. }
  8.  
  9. var valueTruebutton = document.getElementById("truebutton").value;
  10.  
  11. var rapperA = {firstName:"A$AP Rocky", image:"test.jpg", clip:"test.com", status:"true", smallthumbnail: "test.png"};
  12.  
  13. <button id="truebutton" onclick="compareStatusTrueButton()" style="background-color: #4BCC92; border: none; font-size: 2em;" value="true">True</button>
  14.  
  15. console.log("randomRapper.name:" + randomRapper.firstName + ", randomRapper.status: " + randomRapper.status + " valueTruebutton: " + valueTruebutton + " valueFalsebutton: " + valueFalsebutton )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement