Implementation of a Linear equation solving algorithm in JavaScript

 <<algorithm

example of an algorithm solving the linear equation

<!DOCTYPE html>
<html>
<body>
<script>
var a = prompt("a:","");
var b = prompt("b:","");
if (a==0) 
  if (b==0) alert("Identity equation");
  else alert("Contrary equation");
else {
  var x = -b/a;
  alert("x = " + x);
};
</script> 
</body>
</html>