From 15419f56280da277377fb10ce4136e5f7c16ecf8 Mon Sep 17 00:00:00 2001 From: Elliot Gerchak Date: Wed, 23 Nov 2016 13:24:37 +0000 Subject: [PATCH] moved var definition --- In Javascript/airgap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/In Javascript/airgap.js b/In Javascript/airgap.js index 0dfe7a8..4e8bafc 100644 --- a/In Javascript/airgap.js +++ b/In Javascript/airgap.js @@ -8,7 +8,6 @@ function now() { var NSEC_PER_SEC = 1000000000; var register = 3.1415; -var logs = document.getElementById('logs'); function square_am_signal(time, freq) { window.logs.value += "\nPlaying / " + time + " seconds / " + freq + "Hz"; @@ -29,6 +28,7 @@ function square_am_signal(time, freq) { } function start() { + var logs = document.getElementById('logs'); var song = document.getElementById("tones").value.split("\n"); var length = song.length; var line, time, freq;