2021年2月10日星期三

Ternary Operator with two conditionals

I have to learn ternary operator but I can ask a question, how to mount console.log (array) in ternary operator since it does not compile.

   const string3 = (value3, separator) => {      if (typeof value3 === "string" && typeof value3! = "") {        constant array = value3.split (separator)        console.log (array)}      else {console.log ("error")}     }    string3 ('hello how are you', '');  
https://stackoverflow.com/questions/66131165/ternary-operator-with-two-conditionals February 10, 2021 at 01:03PM

没有评论:

发表评论