I want to pass my function's size parameter to be used inside the same function, specifically inside an 'if' statement.
function text_size(size){
if (size = '1'){
alert('something')
}
else if (size = '2'){
alert('something else')
}
}
This function is called inside another function (didn't write the whole function):
if (newImg.height > 750, newImg.width > 750){
text_size('1')
}
else if (newImg.height < 500, newImg.width < 500){{}
text_size('2')
}
As for now it always alerts 'something' regardless of the parameters.