Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

User:BakiDance/common.js

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
// Get the parent element that contains the span
var parentElement = document.getElementById('simple-calc__container'); // Replace 'parentElementId' with the ID of the parent element

// Get the span element
var spanElement = document.getElementById('simple-calc__rinput1'); // Replace 'spanElementId' with the ID of the span element

// Create the input element
var inputElement = document.createElement('input');
inputElement.type = 'text';

// Set any desired attributes or properties for the input element
inputElement.id = 'simple-calc__input1'; // Set the ID for the input element
inputElement.placeholder = 'Enter a value'; // Set a placeholder text if desired

// Replace the span element with the input element
parentElement.replaceChild(inputElement, spanElement);


//

var i = 1;
var l = 4;
var j = 1;
var k = 40;

var answers = [
    (i + (i * (l - k) * 0.01) - ((i + (i * (l - 2) * 0.01)) * (j - 1) * 0.09))
];

console.log('Your answer is (' + answers[0] + ')');