function default parameters in javascript
This commit is contained in:
parent
6b10980a86
commit
a1b5a6626f
|
@ -18,7 +18,10 @@ function createElem(type,attributes){
|
||||||
{elem.setAttribute(i,attributes[i]);}
|
{elem.setAttribute(i,attributes[i]);}
|
||||||
return elem;
|
return elem;
|
||||||
}
|
}
|
||||||
function connectFour(bot1,bot2,xd_check, newGame=true){
|
function connectFour(bot1,bot2,xd_check, newGame){
|
||||||
|
if (newGame === undefined){
|
||||||
|
newGame = true;
|
||||||
|
}
|
||||||
document.getElementById('fightResult').innerHTML = '';
|
document.getElementById('fightResult').innerHTML = '';
|
||||||
//create grid
|
//create grid
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user