+ 1

Is it possible to concat an operator in js and it would still perform the operator?

example : fucntion myfunc (a," ",c) { var d = a + b + c Return d } Document.write(myfunc(3,+,4)) to get 7

26th Apr 2019, 8:36 PM
Oluwasegun Are
Oluwasegun Are - avatar
1 Respuesta
0
You can use eval() to convert strings into code. It is not save though.
26th Apr 2019, 9:38 PM
spotbot2k
spotbot2k - avatar