Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Responsive Designs

Members
  • Joined

  • Last visited

Everything posted by Responsive Designs

  1. I've recently started teaching myself Javascript. I'd thought I'd see how object orientated prorgamming is handled in Javascript and as a result have written up this simple player creation and am just wondering whether I'm approaching this correctly? /** * Player Constructor */ function Player() { this.username; this.password; } /** * Player Username Setter * * @[member="param"] username * The Username to be set */ Player.prototype.setPlayerUsername = function(username) { // Check undefinied if(typeof username != 'undefined') { // Set Player Username this.username = username; } else { console.log("Please enter a valid parameter..."); } } /** * Player Password Setter * * @[member="param"] password * The Password to be set */ Player.prototype.setPlayerPassword = function(password) { // Check undefined if(typeof password != 'undefined') { // Set Player Password this.password = password; } else { console.log("Please entier a valid parameter...") } } /** * Player Username Getter * * @return The Current Player's Username */ Player.prototype.getPlayerUsername = function() { return this.username; } /** * Player Password Getter * * @return The Current Player's Password */ Player.prototype.getPlayerPassword = function() { return this.password; } /** * Create new Player * * @[member="param"] username * The Player's Username * @[member="param"] password * The Player's Password */ Player.prototype.create = function(username, password) { this.password = password; this.username = username; // new Player Object var player_to_create = new Player(); player_to_create.setPlayerUsername = username; player_to_create.setPlayerPassword = password; // log output console.log("Player Created: " + this.username + " " + this.password + "."); // save } Player.prototype.create(prompt("Enter a desired Username..."), prompt("Enter a desired Password...")); Thank you for any feedback.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.