Help : how do i compare two words to see if they are the same word

RE: how do i compare two words to see if they are the same word

による admin 掲載 Jan 29 2022, 8:22

In Self you can just use the == operator,

"hello" == "hello";
"hello" !="goodbye";
var word = "hello";
if (word == "hello") {
...

 

For the star variable is patterns use toString() first.

if (star.toString() == "hello") {
  ...


Id: 41579667
掲載: Jan 29 2022, 8:22
回答: 0
眺望: 194, 今日の: 2, 週間: 2, 月: 13
0 0 0.0/5