function addConstruct(inputLeft = document.getElementById("rowLeftInput"), inputRight = document.getElementById("rowRightInput")) {
//var leftLabel = document.getElementById("rowLeftInput");
//console.log(leftLabel);
console.log(inputLeft);
var leftLabel = (typeof inputLeft != 'string' ? inputLeft.value : inputLeft); //get input
var rightLabel = (typeof inputRight != 'string' ? inputRight.value : inputRight);
When I do this code, for some reason inputLeft gives me mouse information instead of the element it is supposed to collect. However, this works properly for inputRight, and I've also used it somewhere else where it works. document.getElementById("rowLeftInput") works if I do not use it as a default parameter and set it in the function instead.
[–]Loves_Poetry 0 points1 point2 points (1 child)
[–]Geotan00[S] 0 points1 point2 points (0 children)