prompt js
var answer = prompt("How are you? ");var answer = prompt('What is your name?','Joe Blogg');var person = prompt("Please enter your name", "Harry Potter");
if (person != null) {
document.getElementById("demo").innerHTML =
"Hello " + person + "! How are you today?";
}Copyvar name = window.prompt("Enter your name: ");
alert("Your name is " + name);import React, { Component } from 'react';
class App extends Component {
constructor(props) {
super(props);
this.sayHello = this.sayHello.bind(this);
}
sayHello() {
alert('Hello!');
}
return (
<button onClick={this.sayHello}>
Click me!
</button>
);
}
export default App;
Also in JavaScript:
- empty string in javascript
- javascript convert number to spreadsheet column
- jquery visible
- aos animation angular
- npm update package.json version field by code
- To append dropdown option using jquery
- how to create a constant in javascript
- javascript auto scroll down slowly
- what does json.parse do
- create react project
- javascript clear form after dubmit
- select the items from selectors in .map reactjs
- how to get the square root in js
- javascript check if dom element exists
- angular pipe multiple arguments
- extended class call method from super in javascript
- prevent form submission on onsubmit function calls
- compare two arrays
- events.js:174 error discord.js
- advanced axios in react js using create and interceptor
- javascript tutorial
- how play audio js
- jquery wysiwyg editor val acf
- make a fixed list in react native