Learn how to create a travel function with JavaScript using prompt, if and else statement and alert.
function travel() {
let name = prompt("What is your name?");
let email = prompt("What is your email?");
let travel = prompt("Do you enjoy traveling?");
if (travel = "yes") {
alert("Thank you " + name + "! I'll be in touch via email π");
}
else (travel !== "yes")
alert("Thank you" + name + "! we won't bother you with emails at the moment, but if you change your mind, let us know!");
}
how do i console.log a js object
how to track bugs in the app
How to call a function within another function
what is API?
What is a function
What is .length
Give me an example of a for in loop
Is the for loop the same as for of loop
foreach loop example
Explain for loops
Explain .splice
Explain typeof
Explain data types
what is a .push
Explain JSDocs
different types of for loops
What data type is an function in Javascript
what is a float in javascript
what is an integer in javascript
javascript variables
Can you explain JSDocs
how to add - between words in javascript
How to add an event listener to a button element?
explain string to lowercase and give an example of how to code
how to extract milliseconds from the Date object
what is the javascript code for new date?
teach me The call, apply and bind Methods in js with examples
how to convert celsius to fahrenheit
how to increase all elements of array using "for"
how to get the date in javascript
how works "for" in javaScript
Change color of current class to #0097fd if found
round a number
javascript code example
Activate tab based on day of the week add class w--current to activate tab where monday is first
How do I display milliseconds of the current Date
can i use yes in a "if" statement?
what is console.log for
what does this mean !==
add a class to a <li> using JS
I have a prompt and I want to answer me something if user not writing anything what code should I use?
Teach me arrays in JS with examples
what does the program mean when it returns an error for ',' expected. javascript? I'm having that trouble with the code below
how can I make the javascipt say if above 18 or else if below 18
display the current date and time using JavaScript
using Javascript with Document selectors, How can I return a value of the number of list items in a class?
display the current date and time using JavaScript
What array method can be used to return a new array that has filtered out an item based on a condition?
whats the difference between a " for in " loop and a " for of " loop in javascript
could you use more than one document.querySelector on a page?