Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

text.toUpperCase is not a function

var hello = "Hello, ";

function greet(names) {

  if (name == null) {
    console.log(hello + "my friend")
  } else if (name == name.toUpperCase()) {
    console.log(hello.toUpperCase() + name.toUpperCase())
  } else {
    console.log(hello + name);
  }
}

var names = ["jack", "john"]
greet(names);
 Run code snippetHide results
Comment

PREVIOUS NEXT
Code Example
Javascript :: mongo mongoose join aggregation lookup 
Javascript :: fivem player json 
Javascript :: js read file json 
Javascript :: javascript listen array change 
Javascript :: spotify web player 
Javascript :: queryselectorall 
Javascript :: javascript vector 
Javascript :: BREAK A LINE on JS 
Javascript :: javascript check if object is null or empty 
Javascript :: placing card on center in angular flex layout 
Javascript :: generate random special characters javascript 
Javascript :: upload excel file using jquery ajax 
Javascript :: strpos in javascript 
Javascript :: redux dispatch no connect 
Javascript :: how to redirect in react router v6 
Javascript :: java json string to map 
Javascript :: jquery countdown timer 
Javascript :: url validation in formcontrol angular 8 
Javascript :: binary tree implementation javascript 
Javascript :: how to use saved image on react 
Javascript :: join 2 array in javascript 
Javascript :: element.classname javascript 
Javascript :: js show element with focus 
Javascript :: jquery get all value from class 
Javascript :: sentry ignore errors 
Javascript :: add two numbers in javascript 
Javascript :: siwtch case javascript 
Javascript :: javascript if and statement 
Javascript :: print object keys 
Javascript :: jquery: get checkbox from each row of the table and select it 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =