Skip to content
Sign upLog in
Profile icon

IMI

@IMIBUKS
im @CodinUser
GitHub
website
  • IPS

    Cover page
    Made with HTML, CSS, JS
    Recent comments (1)
    IMIBUKS
    IMIBUKS
    5 months ago
    Workspace XP is finally out on GitHub (as a .pyw) and Text Editor XP is now exported to an `.exe` Check the github: https://github.com/PyHubs/Workspace-XP/blob/main/README.md
Repls
Community
IMIBUKS
IMIBUKS
published an Update
4 months ago
0
ihadtoaddarepltothepostsoimadethis
ihadtoaddarepltothepostsoimadethis
JavaScript basics: If statements, Functions, Variables, Prompts/Alerts
JavaScript basic Hello everyone. This is just some basics of JavaScripts I thought i would share. This will cover variables, functions, if statements, and 'Alerts/Prompt'. Please give feedback if any of this is wrong. I am a JavaScript noob Variables There 3 main ways to declare a variable var const let var name = "IMIBUKS" const food = "Icecream" let weather = "Sunny" Var var message = "Hi" Just a regular variable. Can be changed. Const const mood = 'bored' const mood = 'sad' Const cant be redefined. So that code will not work. And const must be assigned a value when made const mood mood = 'bored' So that code is incorrect. As a general rule, always declare a variable with const unless you know that the value will change. Use const when you declare: A new Array A new Object A new Function A new RegExp Let Let variables cant be changed. For example: let name = "IMIBUKS" name = "SomethingElse" Will result in a SyntaxError: 'name' has already been declared, So if you want to define a variable that cant be changed, use let Functions Now for something easier. Functions are simple. function name(parameters) { ..code } You start defining a function by writing function and then the name. Pass any parameters in the brackets. Then use the curly braces and then write the code indented. So for example function sayhi(name) { console.log("Hello " + name) } // Call function sayhi("mom") To stop executing a function use the return. it will also "return" the variable let x = myFunction(4, 3); // Function is called, return value will end up in x function myFunction(a, b) { return a * b; // Function returns the product of a and b } There is more to functions, and to learn it go https://www.w3schools.com/js/js_functions.asp. I am just covering the basics for all th JS noobs like me. If statements The syntax for if statements is somewhat similar to functions name = "Noob" if (name == "noob") { console.log('Welcome to the noob club') } else if (name == "pro") { console.log('I think you are at the wrong place') } else { console.log('Hello ' + name) } You can see we have if, else if and else statements. The syntax is pretty nice tbh. Some other operators you can use are | Operator | Description | Comparing | Returns | |----------|-----------------------------------|-----------|---------| | == | equal to | x == 8 | false | | | | x == 5 | true | | | | x == "5" | true | | === | equal value and equal type | x === 5 | true | | | | x === "5" | false | | != | not equal | x != 8 | true | | !== | not equal value or not equal type | x !== 5 | false | | | | x !== "5" | true | | | | x !== 8 | true | | > | greater than | x > 8 | false | | = | greater than or equal to | x >= 8 | false | | <= | less than or equal to | x <= 8 | true | Alerts, prompts alert('Hello World!') This is an alert. Alerts are modals with an OK button. And their look depends on the browser. prompt('Please enter your username') This is a prompt. This is similar to Alerts, however this comes with an input. For example we are prompting to get a username. We can couple this with the if statement to make a simple JS program. const name = prompt('Please enter your name') if (name == "noob") { console.log('Welcome to the noob club') } else if (name == "pro") { console.log('I think you are at the wrong place') } else { console.log('Hello ' + name) } I hope you enjoyed this tutorial. (Note: I am very new to JavaScript, so i might have got a few things wrong)
IMIBUKS
IMIBUKS
published an Update
4 months ago
0
ksmv1
ksmv1Kid Simulator Ultimate
Kid Simulator
Just a cool game. I know this will flop
IMIBUKS
IMIBUKS
published an Update
5 months ago
0
Workspace XP and Text Editor XP available for download
Workspace XP is finally out on GitHub (as a .pyw) and Text Editor XP is now exported to an .exe Check the github: https://github.com/PyHubs/Workspace-XP/blob/main/README.md
IMIBUKS
IMIBUKS
published an Update
5 months ago
1
Workspace XP
Workspace XPAfter Workspace UI, UX, NT, NT 2.0, this version of workspace arrives
Workspace XP (Windows XP)
Workspace XP Workspace XP is an "virtual environment" or an "user interference" heavily inspired by windows XP. If you like the UI of Windows XP and want to experience a more modern version, here you go! This is the 6th version of Workspace, and the 3rd public version of workspace. Why would i want workspace We understand that windows is kinda ugly now, windows 11 is more consistent with its theme (which i like) but there is still many, many parts where it uses windows 7 like elements, which is a mess. Thus, Workspace XP is attempting to offer a starting ground for the next generation of workspace, with a new, somewhat modern, windows XP design. Workspace UI was great for its customization, however it had a notes app, and that was it. Workspace XP lacks customization but its default UI should please you. We have worked hard to add 3 APPS this time. There are Tic Tac Toe (Offline-Multiplayer) Rock Paper Scissors (Against-AI) TextEditor XP (There is a small bug which we need help) And if this version of Workspace XP succeeds, in the next version we will add Calculator Photo Viewer Drawing App More customization options (settings) and a module allowing easy development of custom workspace xp apps So what are the benefits You get to enjoy an nice UI You get 2 new games You help support the developers and motivate them to allow all those features listed above* Monthly bug fixes (if popular) (for programmers) You can use this as a template for your own custom Virtual Environment (and add your own apps) And unlike most "OS" on replit.com, which are python or other language CLI, this actually comes with a GUI I hope you like it, we spent over 2 months developing this version. If this goes well, Workspace XP 2022 could add all of those amazing features, making it even more useful. And please report all bugs. Thank you
#apps
#templates
#python
+2