JSFiddle - React, Tailwind, and code Playground

by Konrad Bloor

HTML

<link rel="stylesheet" href="https://cdn.jsdelivr.net/jasmine/1.3.1/jasmine.css">
<script src="https://cdn.jsdelivr.net/jasmine/1.3.1/jasmine.js"></script>
<script src="https://cdn.jsdelivr.net/jasmine/1.3.1/jasmine-html.js"></script>

JavaScript

// ************************************************************************************************************************************
//   instructions:
//			0. Dont Panic

//   notes:
//    * This is not timed, complete at your own pace.
// 		* You may use any resources you like, but you need to be able to explain your answers.
// 	  * Consult the TODO comments for instructions.
// 		* Do not modify expect() calls unless there is an INCOMPLETE value. This is how each test is judged for correctness.
//    * After each edit, the tests should re-run automatically. (a green dot instead of a red X indicates success).
// ************************************************************************************************************************************
describe("can we", function () {
	"use strict";
  
  it("understand bools", function() {
    // some people just don't get bools. prove to me that you do.
    function boolean(x, y) {
      // todo: write a function that returns true if the value of x is true, or the value of y is 10, otherwise return false.
      return ;
    }

    expect(boolean(true, 99)).toBe(true);
    expect(boolean(false, 10)).toBe(true);
    expect(boolean(false, 99)).toBe(false);
  });
  
  it("write a for loop", function() {
		var sum = 0;
    // TODO: write a 'for' loop which sums the EVEN numbers in the range [1 to 50] (inclusive)    
    
    
    
    expect(sum).toBe(650);
  });